-
Notifications
You must be signed in to change notification settings - Fork 982
Write Firebase Token to Auth instance during exchange_token API #9060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,14 @@ export interface Auth { | |
* {@link @firebase/app#FirebaseServerApp}. | ||
*/ | ||
signOut(): Promise<void>; | ||
/** | ||
* The token response initialized via {@link exchangeToken} endpoint. | ||
* | ||
* @remarks | ||
* This field is only supported for {@link Auth} instance that have defined | ||
* {@link TenantConfig}. | ||
*/ | ||
readonly firebaseToken: FirebaseToken | null; | ||
} | ||
|
||
/** | ||
|
@@ -966,6 +974,13 @@ export interface ReactNativeAsyncStorage { | |
removeItem(key: string): Promise<void>; | ||
} | ||
|
||
export interface FirebaseToken { | ||
// The firebase access token (JWT signed by Firebase Auth). | ||
readonly token: string; | ||
// The time when the access token expires. | ||
|
||
readonly expirationTime: number; | ||
} | ||
|
||
/** | ||
* A user account. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Is this in seconds?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, The expiresIn is in seconds.