generateSecret static method

Future<TotpSecret> generateSecret(
  1. MultiFactorSession session
)

Transforms a PhoneAuthCredential into a MultiFactorAssertion which can be used to confirm ownership of a phone second factor.

Implementation

static Future<TotpSecret> generateSecret(
  MultiFactorSession session,
) async {
  final secret =
      await TotpMultiFactorGeneratorPlatform.instance.generateSecret(session);
  return TotpSecret._(
    secret.codeIntervalSeconds,
    secret.codeLength,
    secret.enrollmentCompletionDeadline,
    secret.hashingAlgorithm,
    secret.secretKey,
    secret,
  );
}