Skip to content

TypeScript API / @laikacms/server/oauth2 / verifyTOTPSetup

Function: verifyTOTPSetup() ​

ts
function verifyTOTPSetup(
   userId, 
   code, 
   config
): Promise<{
  error?: string;
  success: boolean;
}>;

Verify TOTP setup and enable 2FA

Parameters ​

ParameterType
userIdstring
codestring
configTOTPConfig

Returns ​

Promise<{ error?: string; success: boolean; }>

Released under the MIT License.