BA
Better Auth•4d ago
Platon

Doesn't always respect NextJS basepath

For example, if I set a basePath of '/test', after successfuly logging in I'll be redirected to simply '/', rather than '/'
8 Replies
Ping
Ping•4d ago
I'll be redirected to simply '/', rather than '/'
?
Platon
PlatonOP•4d ago
Apologies, meant I'd be redirected to '/' rather than '/test', as that's my baseUrl for the project
Ping
Ping•4d ago
There is a miss-understanding. baseURL in the config refers to the auth API base url, not related to redirecting after any specific action.
Platon
PlatonOP•4d ago
That's absolutely fine, I just meant that this particular action (successful sign-up) redirects me to the hosts root ('/') rather than my next-js configured basePath ('/test') Might be mistaken myself here
Ping
Ping•4d ago
Oh I see, so it's bringing you to the incorrect origin? (Sorry, just double checking I understand)
Platon
PlatonOP•4d ago
That's exactly it, yep I guess that might be part of it being framework agnostic though Thanks for getting back so quickly by the way!
Ping
Ping•4d ago
I think (not super sure), but I heard it's a bug that will be patched.. 🤔 Can you open an issue on this on the GIthub so that it will be tracked?
Platon
PlatonOP•4d ago
Sure thing

Did you find this page helpful?