UserCredential interface
Stay organized with collections
Save and categorize content based on your preferences.
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;
UserCredential.user
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.
[null,null,["Last updated 2023-04-27 UTC."],[],[],null,["# UserCredential interface\n\nA structure containing a [User](./auth.user.md#user_interface), the [OperationType](./auth.md#operationtype), and the provider ID.\n\n`operationType` could be [OperationType](./auth.md#operationtype).SIGN_IN for a sign-in operation, [OperationType](./auth.md#operationtype).LINK for a linking operation and [OperationType](./auth.md#operationtype).REAUTHENTICATE for a reauthentication operation.\n\n**Signature:** \n\n export interface UserCredential \n\nProperties\n----------\n\n| Property | Type | Description |\n|-----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [operationType](./auth.usercredential.md#usercredentialoperationtype) | (typeof [OperationTypeMap](./auth.md#operationtype))\\[keyof typeof [OperationTypeMap](./auth.md#operationtype)\\] | The type of operation which was used to authenticate the user (such as sign-in or link). |\n| [providerId](./auth.usercredential.md#usercredentialproviderid) | string \\| null | The provider which was used to authenticate the user. |\n| [user](./auth.usercredential.md#usercredentialuser) | [User](./auth.user.md#user_interface) | The user authenticated by this credential. |\n\nUserCredential.operationType\n----------------------------\n\nThe type of operation which was used to authenticate the user (such as sign-in or link).\n\n**Signature:** \n\n operationType: (typeof OperationTypeMap)[keyof typeof OperationTypeMap];\n\nUserCredential.providerId\n-------------------------\n\nThe provider which was used to authenticate the user.\n\n**Signature:** \n\n providerId: string | null;\n\nUserCredential.user\n-------------------\n\nThe user authenticated by this credential.\n\n**Signature:** \n\n user: User;"]]