UserCredential interface

A structure containing aUser, theOperationType, and the provider ID.

operationType could beOperationType.SIGN_IN for a sign-in operation,OperationType.LINK for a linking operation andOperationType.REAUTHENTICATE for a reauthentication operation.

Signature:

exportinterfaceUserCredential

Properties

PropertyTypeDescription
operationType(typeofOperationTypeMap)[keyof typeofOperationTypeMap]The type of operation which was used to authenticate the user (such as sign-in or link).
providerIdstring | nullThe provider which was used to authenticate the user.
userUserThe user authenticated by this credential.

UserCredential.operationType

The type of operation which was used to authenticate the user (such as sign-in or link).

Signature:

operationType:(typeofOperationTypeMap)[keyoftypeofOperationTypeMap];

UserCredential.providerId

The provider which was used to authenticate the user.

Signature:

providerId:string|null;

UserCredential.user

The user authenticated by this credential.

Signature:

user:User;

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-04-27 UTC.