Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/auth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,17 @@ export namespace admin.auth {
*/
auth_time: number;

/**
* The email of the user to whom the ID token belongs, if available.
*/
email?: string;

/**
* Whether or not the email of the user to whom the ID token belongs is
* verified, provided the user has an email.
*/
email_verified?: boolean;

/**
* The ID token's expiration time, in seconds since the Unix epoch. That is, the
* time at which this ID token expires and should no longer be considered valid.
Expand Down Expand Up @@ -494,6 +505,16 @@ export namespace admin.auth {
*/
iss: string;

/**
* The phone number of the user to whom the ID token belongs, if available.
*/
phone_number?: string;

/**
* The photo URL for the user to whom the ID token belongs, if available.
*/
picture?: string;

/**
* The `uid` corresponding to the user who the ID token belonged to.
*
Expand Down
4 changes: 4 additions & 0 deletions src/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export interface ListUsersResult {
export interface DecodedIdToken {
aud: string;
auth_time: number;
email?: string;
email_verified?: boolean;
exp: number;
firebase: {
identities: {
Expand All @@ -76,6 +78,8 @@ export interface DecodedIdToken {
};
iat: number;
iss: string;
phone_number?: string;
picture?: string;
sub: string;
tenant?: string;
[key: string]: any;
Expand Down