Supabase Apple Signin

Hii!, I’m implementing authentication with Capacitor, Supabase, and Apple Sign-In. I followed these documentations: Supabase: https://supabase.com/docs/guides/auth/social-login/auth-apple?queryGroups=environment&environment=client&queryGroups=framework&framework=nextjs&queryGroups=platform&platform=web Capacitor: https://capgo.app/docs/plugins/social-login/apple/ios/ On the native app side, everything works fine I get the native Apple Sign-In prompt and receive the expected response. However, when I try to log in through Supabase, I get this error:
const signInWithApple = async () => {
try {
const result = await SocialLogin.login({
provider: 'apple',
options: {
scopes: ['email', 'name']
}
});
console.log(result);
console.log(result.result?.idToken);
const { data, error } = await supabase.auth.signInWithIdToken({
provider: 'apple',
token: result.result?.idToken as string,
});

if (error) throw error;
return data;
} catch (error) {
console.error('Apple sign-in error:', error);
throw error;
}
}
const signInWithApple = async () => {
try {
const result = await SocialLogin.login({
provider: 'apple',
options: {
scopes: ['email', 'name']
}
});
console.log(result);
console.log(result.result?.idToken);
const { data, error } = await supabase.auth.signInWithIdToken({
provider: 'apple',
token: result.result?.idToken as string,
});

if (error) throw error;
return data;
} catch (error) {
console.error('Apple sign-in error:', error);
throw error;
}
}
i got this error : AuthApiError: Unable to detect issuer in ID token for Apple provider Does anyone know where this error might come from or how to fix it?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?