Google is committed to advancing racial equity for Black communities. See how.

ActionCodeResult

public interface ActionCodeResult

Interface for holding the information related to an out of band code.

Nested Class Summary

@interface ActionCodeResult.ActionDataKey Keys to access the account information related to an out of band code. 
@interface ActionCodeResult.Operation Holds the possible operations that an out of band code can perform, which are password reset, verify email, and recover email. 

Constant Summary

int EMAIL Represents an ActionCodeResult.ActionDataKey which is used to key calls to getData(int).
int ERROR Represents an ActionCodeResult.Operation signifying that there was some error in determining what the out of band code is for.
int FROM_EMAIL Represents an ActionCodeResult.ActionDataKey which is used to key calls to getData(int).
int PASSWORD_RESET Represents an ActionCodeResult.Operation signifying that the out of band code was for a password reset.
int RECOVER_EMAIL Represents an ActionCodeResult.Operation signifying that the out of band code was for email recovery.
int REVERT_SECOND_FACTOR_ADDITION Represents an ActionCodeResult.Operation signifying that the out of band code was for reverting a second factor addition.
int SIGN_IN_WITH_EMAIL_LINK Represents an ActionCodeResult.Operation signifying that the out of band code was for signing in a user via an email link.
int VERIFY_BEFORE_CHANGE_EMAIL Represents an ActionCodeResult.Operation signifying that the out of band code was for verifying and updating the user's email.
int VERIFY_EMAIL Represents an ActionCodeResult.Operation signifying that the out of band code was for email verification.

Public Method Summary

abstract String
getData(int key)
This method is deprecated. Use getInfo().
abstract ActionCodeInfo
getInfo()
Returns an ActionCodeInfo object that holds information regarding the operation being performed.
abstract int
getOperation()
Returns the ActionCodeResult.Operation for which this out of band code was intended.

Constants

public static final int EMAIL

Represents an ActionCodeResult.ActionDataKey which is used to key calls to getData(int). This signifies the email before the application of the out of band code.

Constant Value: 0

public static final int ERROR

Represents an ActionCodeResult.Operation signifying that there was some error in determining what the out of band code is for.

Constant Value: 3

public static final int FROM_EMAIL

Represents an ActionCodeResult.ActionDataKey which is used to key calls to getData(int). This signifies the current email associated with the account, which may have changed as a result of the ActionCodeResult.Operation performed.

Constant Value: 1

public static final int PASSWORD_RESET

Represents an ActionCodeResult.Operation signifying that the out of band code was for a password reset.

Constant Value: 0

public static final int RECOVER_EMAIL

Represents an ActionCodeResult.Operation signifying that the out of band code was for email recovery.

Constant Value: 2

public static final int REVERT_SECOND_FACTOR_ADDITION

Represents an ActionCodeResult.Operation signifying that the out of band code was for reverting a second factor addition.

Constant Value: 6

Represents an ActionCodeResult.Operation signifying that the out of band code was for signing in a user via an email link.

Constant Value: 4

public static final int VERIFY_BEFORE_CHANGE_EMAIL

Represents an ActionCodeResult.Operation signifying that the out of band code was for verifying and updating the user's email.

Constant Value: 5

public static final int VERIFY_EMAIL

Represents an ActionCodeResult.Operation signifying that the out of band code was for email verification.

Constant Value: 1

Public Methods

public abstract String getData (int key)

This method is deprecated.
Use getInfo().

Getter for fields pertaining to the operation being performed. Keyed by ActionCodeResult.ActionDataKey.

public abstract ActionCodeInfo getInfo ()

Returns an ActionCodeInfo object that holds information regarding the operation being performed.

For VERIFY_EMAIL and PASSWORD_RESET operations, this will be an ActionCodeInfo

For a REVERT_SECOND_FACTOR_ADDITION operation, this will be an ActionCodeMultiFactorInfo

For RECOVER_EMAIL and VERIFY_BEFORE_CHANGE_EMAIL operations, this will return ActionCodeEmailInfo

For a SIGN_IN_WITH_EMAIL_LINK operation, this will return null.

Returns null if an error occurred.

public abstract int getOperation ()

Returns the ActionCodeResult.Operation for which this out of band code was intended.