TotpMultiFactorAssertion

actual class TotpMultiFactorAssertion(oneTimePassword: String, secret: TotpSecret?, enrollmentId: String?) : MultiFactorAssertion(source)

A verified TOTP factor, mirroring com.google.firebase.auth.TotpMultiFactorAssertion; usually created with TotpMultiFactorGenerator.getAssertionForEnrollment or TotpMultiFactorGenerator.getAssertionForSignIn, which call this constructor with the secret or the enrollmentId respectively.

The Apple and JS SDKs only create TOTP assertions through their TOTP generators, so on those platforms the SDK's assertion is made by its generator when this one is first used: for enrolling secret when it is set, otherwise for signing in with enrollmentId; with neither, using the assertion fails with IllegalArgumentException.

Parameters

oneTimePassword

The one-time password the authenticator app shows; it must not be empty.

secret

The secret being enrolled, from TotpMultiFactorGenerator.generateSecret.

enrollmentId

The MultiFactorInfo.uid of the enrolled factor to sign in with.

expect class TotpMultiFactorAssertion(oneTimePassword: String, secret: TotpSecret?, enrollmentId: String?) : MultiFactorAssertion(source)

A verified TOTP factor, mirroring com.google.firebase.auth.TotpMultiFactorAssertion; usually created with TotpMultiFactorGenerator.getAssertionForEnrollment or TotpMultiFactorGenerator.getAssertionForSignIn, which call this constructor with the secret or the enrollmentId respectively.

The Apple and JS SDKs only create TOTP assertions through their TOTP generators, so on those platforms the SDK's assertion is made by its generator when this one is first used: for enrolling secret when it is set, otherwise for signing in with enrollmentId; with neither, using the assertion fails with IllegalArgumentException.

Parameters

oneTimePassword

The one-time password the authenticator app shows; it must not be empty.

secret

The secret being enrolled, from TotpMultiFactorGenerator.generateSecret.

enrollmentId

The MultiFactorInfo.uid of the enrolled factor to sign in with.

actual class TotpMultiFactorAssertion(oneTimePassword: String, secret: TotpSecret?, enrollmentId: String?) : MultiFactorAssertion(source)

The platform SDKs only create TOTP assertions through their generators, so the SDK's assertion is made when this one is first used: for enrolling secret when it is set, otherwise for signing in with enrollmentId.

Constructors

Link copied to clipboard
actual constructor(oneTimePassword: String, secret: TotpSecret?, enrollmentId: String?)
expect constructor(oneTimePassword: String, secret: TotpSecret?, enrollmentId: String?)
actual constructor(oneTimePassword: String, secret: TotpSecret?, enrollmentId: String?)

Properties

Link copied to clipboard
actual open override val factorId: String

The type of factor, e.g. PhoneMultiFactorGenerator.FACTOR_ID.

expect open override val factorId: String

The type of factor, e.g. PhoneMultiFactorGenerator.FACTOR_ID.

actual open override val factorId: String

The type of factor, e.g. PhoneMultiFactorGenerator.FACTOR_ID.