ActionCodeResult

interface ActionCodeResult


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

Summary

Nested types

@IntDef(value = )
@Retention(value = RetentionPolicy.SOURCE)
annotation ActionCodeResult.ActionDataKey

Keys to access the account information related to an out of band code.

@IntDef(value = )
@Retention(value = RetentionPolicy.SOURCE)
annotation ActionCodeResult.Operation

Holds the possible operations that an out of band code can perform, which are password reset, verify email, and recover email.

Constants

const Int
EMAIL = 0

Represents an ActionDataKey which is used to key calls to getData.

const Int
ERROR = 3

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

const Int

Represents an ActionDataKey which is used to key calls to getData.

const Int

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

const Int

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

const Int

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

const Int

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

const Int

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

const Int

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

Public functions

String?

This function is deprecated.

Use getInfo.

ActionCodeInfo?

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

Int

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

Constants

EMAIL

const val EMAIL = 0: Int

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

ERROR

const val ERROR = 3: Int

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

FROM_EMAIL

const val FROM_EMAIL = 1: Int

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

PASSWORD_RESET

const val PASSWORD_RESET = 0: Int

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

RECOVER_EMAIL

const val RECOVER_EMAIL = 2: Int

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

REVERT_SECOND_FACTOR_ADDITION

const val REVERT_SECOND_FACTOR_ADDITION = 6: Int

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

SIGN_IN_WITH_EMAIL_LINK

const val SIGN_IN_WITH_EMAIL_LINK = 4: Int

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

VERIFY_BEFORE_CHANGE_EMAIL

const val VERIFY_BEFORE_CHANGE_EMAIL = 5: Int

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

VERIFY_EMAIL

const val VERIFY_EMAIL = 1: Int

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

Public functions

getData

fun getData(@ActionCodeResult.ActionDataKey key: Int): String?

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

getInfo

fun getInfo(): ActionCodeInfo?

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

For a SIGN_IN_WITH_EMAIL_LINK operation, this will return null.

Returns null if an error occurred.

getOperation

@ActionCodeResult.Operation
fun getOperation(): Int

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