Skip to content

Kratos redirects twice to OIDC provider when missing traits #2863

@viters

Description

@viters

Preflight checklist

Describe the bug

https://www.ory.sh/docs/kratos/self-service/flows/user-registration#registration-with-google-facebook-github--openid-connect--oauth-20-1:~:text=What%20may%20also%20happen%20is%20that%20the%20Identity%20Schema%20JSON%20includes%20a%20field%20which%20is%20required%20but%20wasn%27t%20provided%20by%20the%20upstream%20identity%20provider%20(for%20example%20Google).%20In%20those%20cases%2C%20the%20end%2Duser%27s%20browser%20is%20returned%20to%20the%20registration%20screen%20with%20the%20form%20validation%20errors.

There is a common case when user creates account through OIDC and needs to set additional traits by himself.

Other platforms (like https://www.figma.com/, https://accounts.spotify.com/) have scenario:

  1. Initialize sign up through Google
  2. Redirected to Google
  3. Pick Google account
  4. Redirect to sign up site
  5. Fill in the rest of traits
  6. Account created, user is logged in

In Kratos the process is:

  1. Initialize sign up through Google
  2. Redirected to Google
  3. Pick Google account
  4. Redirect to sign up site
  5. Fill in the rest of traits
  6. Redirected to Google
  7. Pick Google account
  8. Redirect to sign up site
  9. Account created, user is logged in

I fell that the current Kratos process is user unfriendly and unclear of what is happening. Especially if someone picks different accounts on the step 3 and 7.

Reproducing the bug

  1. Run newest Kratos
  2. Configure Google OIDC
  3. Have at least 2 Google accounts logged in
  4. Prepare schema with required traits without mapping them from provider
  5. Try to register

Relevant log output

No response

Relevant configuration

No response

Version

0.10.1

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or request.staleFeedback from one or more authors is required to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions