You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing the auth/local example I noticed that the redirectTo is not working properly, I
figured that the useAuth().redirectTo value gets cleared before being used.
await$fetch("/api/auth/login",{method: "POST",body: {email: email,password: password,},});useAuth().redirectTo.value=null;// <-- this lineawaituseAuth().updateSession();awaitnavigateTo(useAuth().redirectTo.value||"/");
So the null value could maybe be set after the navigateTo call, or can possibly omitted at all, as it gets set from the auth middleware anyway.
Else, great example, thanks for sharing!
The text was updated successfully, but these errors were encountered:
When testing the
auth/local
example I noticed that the redirectTo is not working properly, Ifigured that the
useAuth().redirectTo
value gets cleared before being used.So the
null
value could maybe be set after thenavigateTo
call, or can possibly omitted at all, as it gets set from the auth middleware anyway.Else, great example, thanks for sharing!
The text was updated successfully, but these errors were encountered: