arzy
04/15/2022, 10:31 PMconst signInWithDiscord = async () => {
const { user, session, error } = await supabase.auth.signIn({
provider: 'discord',
})
console.log(user,session,error)
}
this to fire on button click but the page switches to the login page and loses track of user, session and errorNeedle
04/15/2022, 10:31 PM/title
command!
We have solved your problem?
Click the button below to archive it.garyaustin
04/15/2022, 10:35 PMNeedle
04/15/2022, 10:35 PMarzy
04/15/2022, 10:39 PMgaryaustin
04/15/2022, 10:45 PMsupabase.auth.onAuthStateChange((event, session) => {
console.log(event, session)
})
on your return page, you should see a signin event with session which will have a user object in it, or you can use .auth.user() ... after the signin event occursarzy
04/15/2022, 11:14 PMarzy
04/15/2022, 11:14 PMarzy
04/15/2022, 11:14 PMarzy
04/15/2022, 11:14 PM