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
This triggers two requests: one for the login, the other one to get the session data. If there were a method setSession or loggedIn then one could return the session information as part of the login response.
The text was updated successfully, but these errors were encountered:
This would mean to add hooks to $fetch that can bring side-effects actually, I rather keep it separated ad this applied only for email/password kind of login.
that then can be used in the login flow as follows:
await$fetch('/api/login',{method: 'POST',body: {email: target.email.value,password: target.password.value,},}).then((value)=>{setSessionState(value)// previously this was fetch() })
And perhaps expose the server-side helper that currently sets the fetch return, so that one can use this to return the same value in the login api.
The playground contains the following logic to login a user:
nuxt-auth-utils/playground/components/AuthLogin.vue
Lines 10 to 17 in e039625
This triggers two requests: one for the login, the other one to get the session data. If there were a method
setSession
orloggedIn
then one could return the session information as part of the login response.The text was updated successfully, but these errors were encountered: