Provides a TotpMultiFactorAssertion to confirm ownership of the TOTP (time-based one-time password) second factor. This assertion is used to complete enrollment in TOTP second factor.
Provides a TotpMultiFactorAssertion to confirm ownership of the TOTP second factor. This assertion is used to complete signIn with TOTP as the second factor.
Returns a promise to TotpSecret which contains the TOTP shared secret key and other parameters. Creates a TOTP secret as part of enrolling a TOTP second factor. Used for generating a QR code URL or inputting into a TOTP app. This method uses the auth instance corresponding to the user in the multiFactorSession.
TotpMultiFactorGenerator.FACTOR_ID
The identifier of the TOTP second factor: totp.
Signature:
staticFACTOR_ID:'totp';
TotpMultiFactorGenerator.assertionForEnrollment()
Provides a TotpMultiFactorAssertion to confirm ownership of the TOTP (time-based one-time password) second factor. This assertion is used to complete enrollment in TOTP second factor.
Provides a TotpMultiFactorAssertion to confirm ownership of the TOTP second factor. This assertion is used to complete signIn with TOTP as the second factor.
Returns a promise to TotpSecret which contains the TOTP shared secret key and other parameters. Creates a TOTP secret as part of enrolling a TOTP second factor. Used for generating a QR code URL or inputting into a TOTP app. This method uses the auth instance corresponding to the user in the multiFactorSession.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-19 UTC."],[],[],null,["# TotpMultiFactorGenerator class\n\nProvider for generating a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface).\n\n**Signature:** \n\n export declare class TotpMultiFactorGenerator \n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-----------------------------------------------------------------------------------|-----------|--------|---------------------------------------------------|\n| [FACTOR_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | `static` | 'totp' | The identifier of the TOTP second factor: `totp`. |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|--------------------------------------------------------------------------------------------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [assertionForEnrollment(secret, oneTimePassword)](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorassertionforenrollment) | `static` | Provides a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface) to confirm ownership of the TOTP (time-based one-time password) second factor. This assertion is used to complete enrollment in TOTP second factor. |\n| [assertionForSignIn(enrollmentId, oneTimePassword)](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorassertionforsignin) | `static` | Provides a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface) to confirm ownership of the TOTP second factor. This assertion is used to complete signIn with TOTP as the second factor. |\n| [generateSecret(session)](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorgeneratesecret) | `static` | Returns a promise to [TotpSecret](./auth.totpsecret.md#totpsecret_class) which contains the TOTP shared secret key and other parameters. Creates a TOTP secret as part of enrolling a TOTP second factor. Used for generating a QR code URL or inputting into a TOTP app. This method uses the auth instance corresponding to the user in the multiFactorSession. |\n\nTotpMultiFactorGenerator.FACTOR_ID\n----------------------------------\n\nThe identifier of the TOTP second factor: `totp`.\n\n**Signature:** \n\n static FACTOR_ID: 'totp';\n\nTotpMultiFactorGenerator.assertionForEnrollment()\n-------------------------------------------------\n\nProvides a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface) to confirm ownership of the TOTP (time-based one-time password) second factor. This assertion is used to complete enrollment in TOTP second factor.\n\n**Signature:** \n\n static assertionForEnrollment(secret: TotpSecret, oneTimePassword: string): TotpMultiFactorAssertion;\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| secret | [TotpSecret](./auth.totpsecret.md#totpsecret_class) | A [TotpSecret](./auth.totpsecret.md#totpsecret_class) containing the shared secret key and other TOTP parameters. |\n| oneTimePassword | string | One-time password from TOTP App. |\n\n**Returns:**\n\n[TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface)\n\nA [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface) which can be used with [MultiFactorUser.enroll()](./auth.multifactoruser.md#multifactoruserenroll).\n\nTotpMultiFactorGenerator.assertionForSignIn()\n---------------------------------------------\n\nProvides a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface) to confirm ownership of the TOTP second factor. This assertion is used to complete signIn with TOTP as the second factor.\n\n**Signature:** \n\n static assertionForSignIn(enrollmentId: string, oneTimePassword: string): TotpMultiFactorAssertion;\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------------|--------|---------------------------------------------|\n| enrollmentId | string | identifies the enrolled TOTP second factor. |\n| oneTimePassword | string | One-time password from TOTP App. |\n\n**Returns:**\n\n[TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface)\n\nA [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface) which can be used with [MultiFactorResolver.resolveSignIn()](./auth.multifactorresolver.md#multifactorresolverresolvesignin).\n\nTotpMultiFactorGenerator.generateSecret()\n-----------------------------------------\n\nReturns a promise to [TotpSecret](./auth.totpsecret.md#totpsecret_class) which contains the TOTP shared secret key and other parameters. Creates a TOTP secret as part of enrolling a TOTP second factor. Used for generating a QR code URL or inputting into a TOTP app. This method uses the auth instance corresponding to the user in the multiFactorSession.\n\n**Signature:** \n\n static generateSecret(session: MultiFactorSession): Promise\u003cTotpSecret\u003e;\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n| session | [MultiFactorSession](./auth.multifactorsession.md#multifactorsession_interface) | The [MultiFactorSession](./auth.multifactorsession.md#multifactorsession_interface) that the user is part of. |\n\n**Returns:**\n\nPromise\\\u003c[TotpSecret](./auth.totpsecret.md#totpsecret_class)\\\u003e\n\nA promise to [TotpSecret](./auth.totpsecret.md#totpsecret_class)."]]