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
atob("ImZiZjIxNTg0LTQ4ODMtNGI2OS04YTlmLTk2ZjNiYTQ2OWQ5YSI") === '"fbf21584-4883-4b69-8a9f-96f3ba469d9a"'
Is this expected? I tried adding uuid.v4().replace(/"/g, "") but that didn't work?
Cheers4 Replies
To answer my own question. Yes, there is a rather annoying issue here I guess the solution for a string literal would be
Value := []byte(call.Arguments[1].Export().(string))
Should I create an issue?
GitHub
zitadel/internal/actions/object/metadata.go at 9b0e5bf7147f0a338ffb...
ZITADEL - Identity infrastructure, simplified for you. - zitadel/zitadel
hey @Guyzerothhi and good morning looked a bit more into it and I guess its doing by design, just adding extra quotes while reading javascript code in golang
I think this issue addresses the same
https://github.com/zitadel/zitadel/issues/8338
GitHub
[Bug]:
setMetadata
in Zitadel action sets different value than fr...Preflight Checklist I could not find a solution in the documentation, the existing issues or discussions I have joined the ZITADEL chat Environment Self-hosted Version v2.56.0 Database PostgreSQL D...
imo I think you can reopen the discussion above and show your usecase as the current implementation is more flexibility and consistent and still not a breaking change but your solution is also worth while to look 🙂 and after a discussion we you can open a PR imo :gigilove: (that we really appreciate coming from members)