Jump to top

AdditionalUserInfo

interface

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

Example
const userCredential = await firebase.auth().signInAnonymously();
console.log('Additional user info: ', userCredential.additionalUserInfo);

Properties

isNewUser

</>

Returns whether the user is new or existing.

isNewUser: boolean;

profile

</>

Returns an Object containing IDP-specific user data if the provider is one of Facebook, GitHub, Google, Twitter, Microsoft, or Yahoo.

profile: Record<string, any>;

providerId

</>

Returns the provider ID for specifying which provider the information in profile is for.

providerId: string;

username

</>

Returns the username if the provider is GitHub or Twitter.

username: undefined | string;