Map identity public metadata to id_token in AX consent
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [X] This issue affects my Ory Network project.
- [X] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Describe your problem
The Ory Account Experience does not map any Identity public metadata to the id_token. It only maps the Identity traits. As a user I want to specify data inside he public metadata and have it populate based on the scopes provided.
Describe your ideal solution
Map the public metadata to the id_token when the scope contains the key.
Workarounds or alternatives
A custom consent UI can also be implemented, but this requires a lot of work for only a couple more fields in the id_token!
Version
latest
Additional Context
No response
I believe we have an item on the backlog to allow customizing the session data using a JsonNet which receives the request context + identity information, which would solve this issue too. It's however currently not on the roadmap iirc.