Traits cannot be set during self-service OIDC registration #3413
Replies: 3 comments 7 replies
-
Any ideas? I'm also happy to pay for the support, but I'm not a big tech corp :) |
Beta Was this translation helpful? Give feedback.
-
Hi! Kratos assumes, that the traits all come from the OIDC provider. You can use the Jsonnet data mapping to achieve that. If that's not the case, you'll need to add a custom form inside your application after the registration to collect the data (e.g. via a In your case, you might be able to get the local claims = std.extVar('claims');
{
identity: {
traits: {
// The email might be empty if the user hasn't granted permissions for the email scope.
[if 'email' in claims then 'email' else null]: claims.email, // adjust for your provider's mapping
tac: true,
dp: true,
lang: // depends on your provider...
},
},
} (untested, but should work) |
Beta Was this translation helpful? Give feedback.
-
Hello, I have a similar problem with oidc and traits parameters with google provider, how did you manage to solve it? @openscript |
Beta Was this translation helpful? Give feedback.
-
I've created the following identity traits:
They work well of password self-service flows. When I make a GET Request to
.ory/kratos/public/self-service/registration
I receive:As the traits are only in the group
password
they are not available foroidc
registration. Is this correct? How to set the traits for OIDC account?Beta Was this translation helpful? Give feedback.
All reactions