Back to Firebase Js Sdk

AdditionalUserInfo interface

docs-devsite/auth.additionaluserinfo.md

12.12.11.8 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

AdditionalUserInfo interface

A structure containing additional user information from a federated identity provider.

<b>Signature:</b>

typescript
export interface AdditionalUserInfo 

Properties

PropertyTypeDescription
isNewUserbooleanWhether the user is new (created via sign-up) or existing (authenticated using sign-in).
profileRecord<string, unknown> | nullMap containing IDP-specific user data.
providerIdstring | nullIdentifier for the provider used to authenticate this user.
usernamestring | nullThe username if the provider is GitHub or Twitter.

AdditionalUserInfo.isNewUser

Whether the user is new (created via sign-up) or existing (authenticated using sign-in).

<b>Signature:</b>

typescript
readonly isNewUser: boolean;

AdditionalUserInfo.profile

Map containing IDP-specific user data.

<b>Signature:</b>

typescript
readonly profile: Record<string, unknown> | null;

AdditionalUserInfo.providerId

Identifier for the provider used to authenticate this user.

<b>Signature:</b>

typescript
readonly providerId: string | null;

AdditionalUserInfo.username

The username if the provider is GitHub or Twitter.

<b>Signature:</b>

typescript
readonly username?: string | null;