busy-van-76750
08/31/2024, 1:59 PMchilly-king-10285
08/31/2024, 1:59 PMchilly-king-10285
08/31/2024, 1:59 PMmarkdown # Identity 1 credentials: password: id: password identifiers: - [[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>) --- # Identity 2 credentials: oidc: id: oidc identifiers: - [[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>)
(Source: [Ory Kratos Concepts](https://www.ory.sh/docs/kratos/concepts/credentials)) When using a custom identity schema, you can mark the fields which are the password identifiers (username, email, phone number). For example, to allow both the username and email address for signing in, you can define the following for both username
and email
fields: json { // ... "<http://ory.sh/kratos|ory.sh/kratos>": { credentials: { password: { identifier: true, }, }, }, }
(Source: [Ory Kratos Concepts - Custom Identity Schema](https://www.ory.sh/docs/kratos/concepts/credentials/username-email-password#custom-identity-schema)) Please note that merging of credentials should be done carefully to maintain the security and integrity of user data.