Skip to content

[Feature Request] Auth-Initialize: Optionally refresh expired idToken via onIdTokenChanged() instead of onAuthStatusChanged() #411

@Kasonz

Description

@Kasonz

Hi there,

Great module first of all!

We are looking for using nuxt-firebase to replace our custom logic + firebase package. I have read the document and played around.

Can you please help here?

let's say the app is configured as service worker + SSR: true

  1. We got the user idToken from nuxtServerInt or authstateChanged action, configured the token as Axios authorization header
  2. the user works on the page for more than 1 hour (the id token apparently is expired)
  3. user click button to send CURD request to our server middleware (or same-origin backend) via Axios (/api/**)

Is there a possibility service worker or nuxt-firebase to auto-detect & auto-refresh the id token in the request header? I only see it auto-inject in HTML page

Many thanks

Metadata

Metadata

Assignees

Labels

all-clearEverything is clear - can be worked onfeatureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions