Hi all. I’m trying to implement registration via O...
# talk-kratos
f
Hi all. I’m trying to implement registration via OIDC method and i have username as part of my identity schema (https://www.ory.sh/docs/kratos/self-service/flows/user-registration#registration-with-google-facebook-github--openid-connect--oauth-20-1 <-- exactly this case with missing “website” trait). But after the form pops up and the user enters the username - it sends me again to the social provider. Is there a way to avoid this?
w
Do you mean that the user has to login once again after they sign up with a social sign-in provider?
f
so in the logs i see: -> login with a social provider, redirect to kratos -> kratos complains username trait is missing (because it’s not in the social provider claims) -> form where user can add username -> and login with a social provider again.
so it looks like kratos ignores all the claims provided by the social provider first time
w
What provider are you trying to integrate with? Did you follow the instruction from the docs? https://www.ory.sh/docs/kratos/social-signin/overview
there are provider - specific instructions for common providers
f
yeah, evrything with provider itself works fine. one of my colleagues recorded the video explaining the issue
l
what did you put in your
mapper_url
/ jsonnet file ?
f
Copy code
local claims = {
  email_verified: true,
} + std.extVar('claims');

{
  identity: {
    traits: {
      [if 'email' in claims && claims.email_verified then 'email' else null]: claims.email,
      name: claims.name,
      image: claims.picture,
    },
  },
}
this is google.jsonnet
l
sorry I didn't understand your issue properly, you have a traits that you need the user to confirm and you would like to avoid having to go again in through the oidc flow
f
i have traits that i map from oidc, i also have extra trait - username. i want to go through oidc flow, then show form requesting missing trait (username) and then register (without going through oidc again).