I'm trying to test out my Nuxt app with Facebook login but I keep getting an error on the address bar:
?error=server_error&error_description=Error+getting+user+email+from+external+provider#_=_
No other errors on the console. I got all set up: Facebook app, Facebook advanced access on email
and public_profile
, callback URLs, app ID, and keys. It would go through Facebook's auth page then it redirects to my localhost with the error. User won't be registered to auth.users
as well.
const supabase = useSupabaseAuthClient();
const socialAuth = async (provider) => {
const { error } = await supabase.auth.signInWithOAuth({ provider: provider });
if (error) {
console.log(error);
} else {
console.log("Social Auth success.");
}
};
<template>
<div>
<button @click="socialAuth('facebook')">Login with Facebook</button>
</div>
</template>
I've tried posting this in their GitHub discussions but I haven't received an answer from the community so far.