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
Amazing work on the video and these repos (this one and the functions ones)!
I had an issue with trying to make the authentication persistent -
Currently:
The user signs in -> gets a token (generated by getIdToken() on the backend) -> saves it in local storage -> every requests is being sent with a header containing the Authorization header -> FBAuth middleware uses VerifyIdToken()
Works flawlessly.. for an hour, then the token expires and my http requests start getting 403 and the auth/id-token-expired and the only way to handle this is to sign out the user and then sign in again.
Maybe I'm missing something?
Possible solutions I thought of
generating a custom token on the backend, verifying them and when it fails my client-side tries to signInWithCustomToken or maybe regenrate it somehow?
Start using the firebase client side SDK to make it handle all the work for me?
Any other thoughts? :)
Thanks!
The text was updated successfully, but these errors were encountered:
Amazing work on the video and these repos (this one and the functions ones)!
I had an issue with trying to make the authentication persistent -
Currently:
The user signs in -> gets a token (generated by
getIdToken()
on the backend) -> saves it in local storage -> every requests is being sent with a header containing the Authorization header -> FBAuth middleware usesVerifyIdToken()
Works flawlessly.. for an hour, then the token expires and my http requests start getting 403 and the
auth/id-token-expired
and the only way to handle this is to sign out the user and then sign in again.Maybe I'm missing something?
Possible solutions I thought of
Any other thoughts? :)
Thanks!
The text was updated successfully, but these errors were encountered: