Social login not working with Safari in production

I've enabled Google as a provider for social login. It works great in Chrome in dev and production. Safari even works great in dev. But in prod, when I click "Continue with Google" the page just seems to refresh. Is there something special about Safari in prod that makes it different than Chrome when it comes to social logins? Credentials work fine.
Solution:
yeah, that fixes it. What's the best way to redirect the user after successful social login? I don't want them to go back to the homepage. I'd like for the path to be /dashboard instead.
Jump to solution
12 Replies
lonelyplanet
lonelyplanet2mo ago
Seems like When you are hitting the button you are being sent to google but since you already Authed sent straight back from google auth to your app have you verified that the page just refreshes or that infact you are being sent to google but instantly redirected back
Jimmy
JimmyOP2mo ago
it's really hard to tell. here's the network log from Safari.
Jimmy
JimmyOP2mo ago
No description
Jimmy
JimmyOP2mo ago
No description
Jimmy
JimmyOP2mo ago
that's the code that executes when the button is pressed
lonelyplanet
lonelyplanet2mo ago
I don't use safari and cannot tell you how to check But i dont believe that it is betterauth in this case
Jimmy
JimmyOP2mo ago
To add to the confusion: it works fine on my iphone / safari / prod.
lonelyplanet
lonelyplanet2mo ago
Try resetting your cookies on google.com or trying from incognito
Jimmy
JimmyOP2mo ago
yeah, did that. No luck with either. I'm going to deploy an update that removes the router.push and router.reset on success and instead just log something maybe that'll reveal something
Solution
Jimmy
Jimmy2mo ago
yeah, that fixes it. What's the best way to redirect the user after successful social login? I don't want them to go back to the homepage. I'd like for the path to be /dashboard instead.
Jimmy
JimmyOP2mo ago
callbackURL doesn't work for me.
Jimmy
JimmyOP2mo ago
No description

Did you find this page helpful?