OIDC Login with already registered account failing #1870
-
Kratos Version: 0.7.6 When attempting to login via Google OIDC with an existing Kratos identity (created via 'password' flow), I see this error in the logs and the registration flow gets activated.
Relevant section of the kratos.yaml
The JSONNET file:
Anyone able to login via Google OIDC with existing identities in 0.7.6? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
A little more background... in the code it seems that the login for OIDC providers is using the Subject (in Google's case that's a very large integer, not an email). From selfservice/strategy/oidc/strategy_login.go func (s *Strategy) processLogin(w http.ResponseWriter, r *http.Request, a *login.Flow, token *oauth2.Token, claims *Claims, provider Provider, container *authCodeContainer) (*registration.Flow, error) {
i, c, err := s.d.PrivilegedIdentityPool().FindByCredentialsIdentifier(r.Context(), identity.CredentialsTypeOIDC, uid(provider.Config().ID, claims.Subject))
<snip> The inbound Reading this makes me think there's no way to OIDC login with an account that was created via the 'password' flow. Can anyone confirm? |
Beta Was this translation helpful? Give feedback.
-
quoting #1870 (reply in thread)
|
Beta Was this translation helpful? Give feedback.
-
That can be insecure only if you can confirm email address If you have access to This limitation leads to very poor UX. If user can recover account via email, why It is not possible to login in one click with google account? Is there any way to bypass this limitation? |
Beta Was this translation helpful? Give feedback.
-
Hello @matthewmcneely @aveeday @david972 Ory Kratos now supports automatic account linking for OIDC. This is merged on master and available in production in Ory Network and will be included in the next Ory Kratos release. |
Beta Was this translation helpful? Give feedback.
Hello @matthewmcneely @aveeday @david972
Ory Kratos now supports automatic account linking for OIDC.
Read more about the implementation in the official docs: https://www.ory.sh/docs/kratos/social-signin/link-multiple-provider-account and the PR #3563
This is merged on master and available in production in Ory Network and will be included in the next Ory Kratos release.