Callback when logging in with social.
Hi guys, is there a way to listen for a callback when a user does a signup using a social platform? Thanks
2 Replies
I want to listen for when a user firstly creates their account using a social
const res = await authClient.signIn.social({ provider: "discord" })
Instead of the newUserCallback
const res = await authClient.signIn.social({ provider: "microsoft", newUserCallbackURL: '/dashboard?welcome=true', callbackURL: '/dashboard' })you can either use db hooks on create user or use hooks + createdAt field to determine if it's a signup or signin