Social login on server
Can I user social sign in on server like:
If I can, what's the proper way to do that? I'm currently using it inside a server action and better auth returns "Invalid URL" even though I've passed in the valid one to the callbackURL.
6 Replies
don't pass a full url for callback like
http://localhost:3000/dashboard
just pass /dashboard
. And since it can't redirect directly you'd need to redirect the user yourself from the response data.url
I tried with "/" and "/dashboard" too. But didn't work.
is it still returning invalid url?
Yea, it's still returning invalid url. The provider is github.
can you send the whole error message here?
it's just the Invalid URL with the code "ERR_INVALID_URL".
