Prevent full page reload on SPA when signUp
Hi everyone, when using the authClient.signUp.email I get a full-page reload (SPA Vite, React, Tanstack Router) which affects the UX. I just want to be able to manage the result locally.
4 Replies
Do you specify a callback?
A callback URL? yes, I specify a url that is being kept when receiving the URL via e-mail for confirmation. Also, I tried the onSucess and onError callbacks in the signUp function. Just to make it clear: this is not a form issue, it occurs specificly when calling this function.

also it doesn't make a difference if I remove the callback url,
For now, I ended up just not using the authClient... instead just calling a custom endpoint and doing the auth,api.signup server side. i was debugging a little bit the code and it looks like the redirect is made by better-fetch but can't figure out why or how to prevent that.