Based on nestjs authentication documentation
This project is compatible with Google Authenticator, and includes additional methods to allow you to work with insomnia API.
to lib install
yarn
to run service
yarn start:dev
returns credentials
#POST /authentication/login
:payload:
{
"email": "john@test.com",
"password": "changeme"
}
returns a base64 qrcode image to register in Google Authenticator
#POST /authentication/2fa/generate
authenticate user from token
#POST /authentication/2fa/authenticate
:payload:
{
"email": "john@test.com",
"twoFactorAuthenticationCode": "188388"
}
create new token
#POST /authentication/2fa/token
:payload:
{
"email": "john@test.com"
}
#POST /authentication/2fa/turn-on
:payload:
{
"email": "john@test.com",
"twoFactorAuthenticationCode": "903927"
}
Copyright (c) 2022-present