Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Nuxt - Firebase Authentication

App Init
1. Parse cookie
2. Get the accessToken
3. Set the auth in the state
4. Decode token
Check for the cookies in the request headers Info
5. Set the user data in the state

Update Auth Cookie?

1. Remove auth cookie


2. Clear the auth state
1. Set loading state to true
2. Send the credentials to the server and
await for the response
3. Get the user data
4. Set the auth in the state
Login 5. Set the user data in the state Logout
6. Set the loading to false
7. Redirect ?

Optionally, set the authorization headers.

User authenticated User unauthenticated

You might also like