mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-25 10:13:54 -05:00
chore: remove type casting for provider id (#7468)
This commit is contained in:
@@ -172,9 +172,7 @@ export const callbackOAuth = createAuthEndpoint(
|
||||
if (link) {
|
||||
const trustedProviders =
|
||||
c.context.options.account?.accountLinking?.trustedProviders;
|
||||
const isTrustedProvider = trustedProviders?.includes(
|
||||
provider.id as "apple",
|
||||
);
|
||||
const isTrustedProvider = trustedProviders?.includes(provider.id);
|
||||
if (
|
||||
(!isTrustedProvider && !userInfo.emailVerified) ||
|
||||
c.context.options.account?.accountLinking?.enabled === false
|
||||
|
||||
@@ -48,7 +48,7 @@ export async function handleOAuthUserInfo(
|
||||
c.context.options.account?.accountLinking?.trustedProviders;
|
||||
const isTrustedProvider =
|
||||
opts.isTrustedProvider ||
|
||||
trustedProviders?.includes(account.providerId as "apple");
|
||||
trustedProviders?.includes(account.providerId);
|
||||
if (
|
||||
(!isTrustedProvider && !userInfo.emailVerified) ||
|
||||
c.context.options.account?.accountLinking?.enabled === false
|
||||
|
||||
Reference in New Issue
Block a user