Dealing with generic OAuth provider that does not send email and account linking

Two part question:

Hi all, we have a external OIDC IdP that does not reliably return an email in the token claims. When using the generic Oauth plugin, we get a Error Code: email_is_missing on callback. mapProfileToUser does not seem to get around this error. What's the best approach here?

Second, we do get a reliable universal user identifier in the claims that can link a user to a specific human. Is there a way to customize the account linking feature based on something other than email but instead this unique user key?
Was this page helpful?