diff --git a/src/auth.d.ts b/src/auth.d.ts index cfc2c1fd9c..61275841f7 100644 --- a/src/auth.d.ts +++ b/src/auth.d.ts @@ -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. @@ -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. * diff --git a/src/auth/auth.ts b/src/auth/auth.ts index cbc22cd9d4..7ba53671ae 100755 --- a/src/auth/auth.ts +++ b/src/auth/auth.ts @@ -64,6 +64,8 @@ export interface ListUsersResult { export interface DecodedIdToken { aud: string; auth_time: number; + email?: string; + email_verified?: boolean; exp: number; firebase: { identities: { @@ -76,6 +78,8 @@ export interface DecodedIdToken { }; iat: number; iss: string; + phone_number?: string; + picture?: string; sub: string; tenant?: string; [key: string]: any;