@oneblink/apps-react
    Preparing search index...

    Function setupMfa

    • Setup MFA for the current user. The result will include a callback that should be called with the valid TOTP from an authenticator app.

      const { secretCode, mfaCodeCallback } = await authService.setupMfa()
      // Prompt the user to enter an MFA code
      const code = prompt(
      `Please enter a one-time code from your MFA app after creating a new entry with secret: ${secretCode}.`,
      )
      await mfaCodeCallback(code)

      Returns Promise<
          | {
              mfaCodeCallback: (code: string) => Promise<void>;
              secretCode: string | undefined;
          }
          | undefined,
      >