<@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 methods
b
A message from kapa.ai
Based on the knowledge sources, it appears that you can configure verification requirements differently for various authentication methods in Ory, including OIDC providers. When using social sign-in with OIDC providers, you can control whether email verification is required through the data mapping configuration. For example, in the Auth0 and GitLab provider configurations, you can see that the Jsonnet code snippets only map the email to the identity traits if it's verified:
Copy code
jsonnet 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 allows you to selectively handle email verification for specific OIDC providers [Auth0 Social Sign-In](https://www.ory.sh/docs/kratos/social-signin/auth0) and [GitLab Social Sign-In](https://www.ory.sh/docs/kratos/social-signin/gitlab). Additionally, there was a known issue where the "Require Verified Address for Login" setting wasn't properly applied to OIDC identities, but this has been fixed according to the knowledge sources [Github Issue #246](https://github.com/ory/network/issues/246). If you want to require verified addresses only for specific authentication methods, you can configure the
require_verified_address
hook for specific methods rather than globally:
Copy code
ory patch identity-config {project_id} \     --add '/selfservice/flows/login/after/password/hooks=[{"hook": "require_verified_address"}]'
You can omit adding this hook for the OIDC methods you want to exempt from email verification requirements. Note that there are some limitations and potential issues with verification across different authentication methods, as indicated by some of the GitHub issues in the knowledge sources. For example, there's an open issue about verification emails being sent when signing up with SMS code.