GuyzerothG
ZITADELβ€’6mo agoβ€’
4 replies
Guyzeroth

api.v1.user.appendMetadata is adding "" to uuid

Hello,

The following code in an action

api.v1.user.appendMetadata('user_id', uuid.v4());

Appears to create UUID's that when de-encoded from the base64 e.g
  "urn:zitadel:iam:user:metadata": {
    "user_id": "ImZiZjIxNTg0LTQ4ODMtNGI2OS04YTlmLTk2ZjNiYTQ2OWQ5YSI"
  }

atob("ImZiZjIxNTg0LTQ4ODMtNGI2OS04YTlmLTk2ZjNiYTQ2OWQ5YSI") === '"fbf21584-4883-4b69-8a9f-96f3ba469d9a"'

Is this expected? I tried adding uuid.v4().replace(/"/g, "") but that didn't work?

Cheers
Was this page helpful?