Fix provider includes typing

cgen-00d6d581accf42de9c17d61c96444557
This commit is contained in:
Builder.io 2025-09-30 08:30:48 +00:00
parent f03a0b9c8d
commit 342c8c1108

View file

@ -441,7 +441,9 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
const supported: SupportedOAuthProvider[] = ["github", "google"];
if (!user?.identities) return [];
return (user.identities as any[])
.filter((identity) => supported.includes(identity.provider))
.filter((identity) =>
supported.includes(identity.provider as SupportedOAuthProvider),
)
.map((identity) => ({
provider: identity.provider as SupportedOAuthProvider,
identityId: identity.identity_id,