kratos
kratos copied to clipboard
Social Sign In - metadata_public / metadata_admin fields defined in JSONNET snippet not set
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.
- [ ] This issue affects my Ory Cloud project.
- [ ] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
We enabled Social Sign In with Google for our self hosted Ory Kratos project. In the required Jsonnet snippet we defined some keys in the metadata_public field. After sign in via Google the metadata_public field of the new created user is null.
We also tested this with metadata_admin and had the same result.
In the documentation is written:
You can set public and admin metadata fields, these fields will then be populated whenever data is mapped.
Reproducing the bug
Enable Google Social Sign In and use a JSONNET config file with keys set in metadata_public.
Relevant log output
No response
Relevant configuration
local claims = {
email_verified: true,
} + std.extVar('claims');
{
identity: {
traits: {
[if 'email' in claims && claims.email_verified then 'email' else null]: claims.email
},
metadata_public: {
lorem: "ipsum"
},
metadata_admin: {
dolor: "sit"
}
}
}
Version
v0.10.1
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Other
Additional Context
No response