injected service use to handle the refresh token related operations
injected service use to handle the two factor auth related operations
configuration for login handler
injected logger used to handle the logging
request context [headers, body, params, query].
200 Status OK
{
accessToken: string;
refreshToken?: string;
userId: string;
}
This handler will create verify two factor auth by applying the following steps in sequence:
Get code and token from request body
Get ip and host from request info
Verify code and token (twoFactorAuthService.verifyCode)
Generate access token (crypto.generateUserAccessToken)
Generate refresh token (enableRefreshToken) if enableRefreshToken is true
Set token to cookie (setTokenToCookie) if authType is cookie
Return access token, refresh token and userId
500 NBError Internal Server Error
Generated using TypeDoc
Create verify two factor auth handler