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
Codex 🧃
Codex 🧃OP•3w ago
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' })
bekacru
bekacru•3w ago
you can either use db hooks on create user or use hooks + createdAt field to determine if it's a signup or signin

Did you find this page helpful?