modern-sundown-98061
09/22/2025, 10:18 PMidentifier_first running locally. I am setup with password and multiple oidc providers
I have added in both configs from https://www.ory.sh/docs/identities/sign-in/identifier-first-authentication.
On the React Frontend I use oryClient.createBrowserLoginFlow to create a flow which returns with the UI Nodes with the identifier input and submit input grouped with identifier_first which makes sense but also returns back all of the "buttons" for all of the oidc providers. Which was surprising.
I then try to update the flow with the below using an identifier that has Google oidc as its only credential
oryClient.updateLoginFlow({
flow: currentFlow.data.id,
updateLoginFlowBody: {
method: 'identifier_first',
identifier: identifier,
csrf_token: csrfToken || undefined,
},
})
And surprisingly get a http 400 response with the body now having a top level property of "active": "identifier_first", and within the UI Nodes I still have all of the oidc providers and a password field as well.
The documentation from the link does not go into detail on what should have changed by changing to the identifier_first flow so I was not sure what to expect but this was not it.modern-sundown-98061
09/22/2025, 10:22 PMmodern-sundown-98061
09/22/2025, 10:23 PMB2B Organization loginbland-eye-99092
09/23/2025, 10:47 AMbut I have no clue why it is not finding the identifierare you referring to the 400 error here? It seems like it's working correctly. If you have account enumeration mitigation turned on, we return all configured authentication methods. If it's turned off only the user's configured methods are returned.
modern-sundown-98061
09/23/2025, 1:22 PMbland-eye-99092
09/23/2025, 1:47 PMmodern-sundown-98061
09/23/2025, 2:40 PM{
"$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>",
"$schema": "<http://json-schema.org/draft-07/schema#>",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"minLength": 3,
"<http://ory.sh/kratos|ory.sh/kratos>": {
"credentials": {
"password": {
"identifier": true
}
},
"recovery": {
"via": "email"
},
"verification": {
"via": "email"
}
}
},
"name": {
"type": "object",
"properties": {
"first": {
"title": "First Name",
"type": "string"
},
"last": {
"title": "Last Name",
"type": "string"
}
}
},
"mobile_phone": {
"type": "string",
"title": "Mobile Phone"
},
"image": {
"type": "string",
"title": "Avatar",
"format": "string"
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
}
And yes the jsonnet is properly parsing the claims and pulling the email address from the response as the traits on my identities table record are correct with the email address associated with the OIDC provider that was used to login.
I have never worked in Go but I took a look at the code base and it seems like the query in the idfirst strategy_log to find the identity is func FindIdentityByCredentialIdentifier with the native query.
SELECT ic.identity_id
FROM identity_credentials ic
INNER JOIN identity_credential_identifiers ici
ON ic.id = ici.identity_credential_id
WHERE ici.identifier = ?
AND ic.nid = ?
AND ici.nid = ?
LIMIT 1
But when I look in the identity_credential_identifiers table at OIDC credentials the record that it should be matching on does not have the email address as the identifier..
In this case it is Google:999999999999999999999 so is it not possible to have identifier_first find existing credentials for OIDC providers??modern-sundown-98061
09/23/2025, 2:42 PMidentity_credential_identifiers table to googles internal identifier instead of the email address associarted with the providerbland-eye-99092
09/23/2025, 6:06 PMselfservice.methods.code.passwordless_enabled configuration option, as that actually creates a credential identifier with the user's email address. An additional benefit is that the user can also login with a code that is sent to their email address.
I would still consider this a bug. We'd love to take a look at this, and since you already made the relevant findings, could I ask you to create a bug report in ory/kratos on GitHub? Thank you and thanks for being an active community member ❤️