UserCredential interface  |  Firebase JavaScript API reference (original) (raw)

UserCredential interface

A structure containing a User, the OperationType, and the provider ID.

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

Signature:

export interface UserCredential 

Properties

Property Type Description
operationType (typeof OperationTypeMap)[keyof typeof OperationTypeMap] The type of operation which was used to authenticate the user (such as sign-in or link).
providerId string | null The provider which was used to authenticate the user.
user User The 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: (typeof OperationTypeMap)[keyof typeof OperationTypeMap];

UserCredential.providerId

The provider which was used to authenticate the user.

Signature:

providerId: string | null;

The user authenticated by this credential.

Signature:

user: User;

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

Last updated 2023-04-27 UTC.