enough-vase-33352
04/22/2025, 7:55 AMbrief-egg-61061
04/22/2025, 7:55 AMbrief-egg-61061
04/22/2025, 7:56 AMlocal claims = { email_verified: false, } + std.extVar('claims'); { identity: { traits: { [if 'email' in claims && claims.email_verified then 'email' else null]: claims.email, // Allowing unverified email addresses enables account // enumeration attacks, if the value is used for // verification or as a password login identifier. }, }, }
This approach trusts the OIDC provider's verification status rather than requiring Ory to verify the email again. [Auth0](https://www.ory.sh/docs/kratos/social-signin/auth0) 2. Issue with OIDC and Verification: There's a known issue where the verified status is not carried over from the OIDC provider, meaning users signing in through social providers are considered unverified in Ory Kratos. This is mentioned in a GitHub issue as a "fundamental issue" where "the verified status is not carried over from the oidc provider." [Require verified address doesn't work for OIDC identities](https://github.com/ory/network/issues/246) 3. Verification Hooks: The "require verified address" hook can be configured for specific authentication methods. The console UI might only set this hook for password authentication but not for OIDC. You can use the CLI to configure this more precisely: ory patch identity-config {project_id} \ --add '/selfservice/flows/login/after/password/hooks=[{"hook": "require_verified_address"}]'
By selectively applying or not applying this hook to different authentication methods, you could control verification requirements. [Allow login only with verified email](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation#allow-login-only-with-verified-email) The knowledge sources don't provide a direct method to disable email verification specifically based on which OIDC client was used for authentication. You might need to consider a custom implementation or reach out to Ory support for more specific guidance on this use case.