The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/auth > ActionCodeInfo > data

ActionCodeInfo.data property

The data associated with the action code.

Signature:

data: {
        email?: string | null;
        multiFactorInfo?: MultiFactorInfo | null;
        previousEmail?: string | null;
    };

Description

For the ActionCodeOperation.PASSWORD_RESET, ActionCodeOperation.VERIFY_EMAIL, and ActionCodeOperation.RECOVER_EMAIL actions, this object contains an email field with the address the email was sent to.

For the ActionCodeOperation.RECOVER_EMAIL action, which allows a user to undo an email address change, this object also contains a previousEmail field with the user account's current email address. After the action completes, the user's email address will revert to the value in the email field from the value in previousEmail field.

For the ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL action, which allows a user to verify the email before updating it, this object contains a previousEmail field with the user account's email address before updating. After the action completes, the user's email address will be updated to the value in the email field from the value in previousEmail field.

For the ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION action, which allows a user to unenroll a newly added second factor, this object contains a multiFactorInfo field with the information about the second factor. For phone second factor, the multiFactorInfo is a MultiFactorInfo object, which contains the phone number.