supabase dash board does not provide right information of the auth login 'provider'. #28186
rookiejj
started this conversation in
Contribute to Supabase
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I made the social login using supabase Auth component with React.
And I used two providers, google and github.
And I have google id and github id, and they have same email 'rookiejj@gmail.com'.
I logged in and out google and github in lotation, looking at 'Authentification > Users' side menu.
It shows google provider when I logged in with github, and likely shows github provider when I logged in google.
It should be changed for right information of being logged in with properly social id.
And then, I tried with this function.
I got the right information of the provider this time.
So, I concluded that your dashboard shows wrong information of the social provider.
Am I wrong for this case? Or Need other process?
export async function checkUserProvider() {
const {
data: { user },
} = await supabase.auth.getUser();
if (user) {
// identities 배열에서 마지막으로 사용된 제공자 확인
const lastUsedProvider =
user.identities?.[user.identities.length - 1]?.provider;
} else {
console.log("No user is currently logged in");
return null;
}
}
Beta Was this translation helpful? Give feedback.
All reactions