Write Firebase Token to Auth instance during exchange_token API#9060
Write Firebase Token to Auth instance during exchange_token API#9060mansisampat merged 4 commits intogcip-byociam-webfrom
Conversation
|
Vertex AI Mock Responses Check
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
| // The firebase access token (JWT signed by Firebase Auth). | ||
| accessToken: string; | ||
| expiresIn?: string; | ||
| // The time when the access token expires. |
There was a problem hiding this comment.
Yes, The expiresIn is in seconds.
| } | ||
|
|
||
| async _updateFirebaseToken( | ||
| firebaseToken: FirebaseToken | null |
There was a problem hiding this comment.
Do we have to accept null here?
There was a problem hiding this comment.
Ah i just saw your new changes in https://github.com/firebase/firebase-js-sdk/pull/9061/files. If this.firebaseToken can be null, then this makes sense.
There was a problem hiding this comment.
Correct. We are updating FirebaseToken with null after token expiry.
| export interface FirebaseToken { | ||
| // The firebase access token (JWT signed by Firebase Auth). | ||
| readonly token: string; | ||
| // The time when the access token expires. |
There was a problem hiding this comment.
is this in seconds? Asking because I see you're * 1000 in the above change.
There was a problem hiding this comment.
Looks like it's a timestamp (in milliseconds since epoch)? Could we clarify that in a comment to be more clear? Thanks!
* Write Firebase Token to Auth instance * yarn run format * Fix unit test and run yarn docgen:all * Address comments
Discussion
Testing