Merge pull request #17191 from go-xman/feat/export-common-identify-resolver

chore: add common identify resolvers for `oidc` auth provider
This commit is contained in:
Patrik Oldsberg
2023-04-05 12:42:56 +02:00
committed by GitHub
3 changed files with 23 additions and 1 deletions
@@ -44,6 +44,10 @@ import {
SignInResolver,
} from '../types';
import { createAuthProviderIntegration } from '../createAuthProviderIntegration';
import {
commonByEmailLocalPartResolver,
commonByEmailResolver,
} from '../resolvers';
type PrivateInfo = {
refreshToken?: string;
@@ -255,4 +259,14 @@ export const oidc = createAuthProviderIntegration({
});
});
},
resolvers: {
/**
* Looks up the user by matching their email local part to the entity name.
*/
emailLocalPartMatchingUserEntityName: () => commonByEmailLocalPartResolver,
/**
* Looks up the user by matching their email to the entity email.
*/
emailMatchingUserEntityProfileEmail: () => commonByEmailResolver,
},
});