<@U04UQ68083H> is it possible to only disable emai...
# ory-copilot
e
@chilly-king-10285 is it possible to only disable email verification for users login or signup with specific OIDC clients?
b
A message from kapa.ai
Based on the knowledge sources, there isn't a direct way to selectively disable email verification only for specific OIDC clients. However, there are some approaches you could consider: 1. Using Data Mapping in OIDC Configuration: You can use Jsonnet code in the data mapping for your OIDC provider to control how email verification is handled. For example, in the Auth0 configuration, there's a data mapping that only maps the email if it's verified by the provider:
Copy code
local 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:
Copy code
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.