-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature 2fa #213
Feature 2fa #213
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
bb58b97
to
ee468b8
Compare
}) | ||
|
||
interface Options { | ||
onSuccess?: (response: any) => void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's a good place for DTO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, missing recovery codes which should have been displayed when 2fa was confirmed.
When trying to login, get error:
[Nest] 74169 - 02/10/2024, 4:08:17 PM ERROR [ExceptionsHandler] The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received null
TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received null
at new NodeError (node:internal/errors:405:5)
at Function.from (node:buffer:333:9)
at new Buffer (node:buffer:288:17)
at Object.exports.decode (/Users/vygandas/git/isomera/node_modules/thirty-two/lib/thirty-two/thirty-two.js:87:16)
at Object.keyDecoder (/Users/vygandas/git/isomera/node_modules/@otplib/plugin-thirty-two/index.js:17:20)
at authenticatorDecoder (/Users/vygandas/git/isomera/node_modules/@otplib/core/index.js:413:18)
at authenticatorCheckWithWindow (/Users/vygandas/git/isomera/node_modules/@otplib/core/index.js:423:37)
at Authenticator.checkDelta (/Users/vygandas/git/isomera/node_modules/@otplib/core/index.js:436:12)
at Authenticator.check (/Users/vygandas/git/isomera/node_modules/@otplib/core/index.js:358:24)
at Authenticator.verify (/Users/vygandas/git/isomera/node_modules/@otplib/core/index.js:365:17)
Missing .env maybe or just a bug?
@@ -102,9 +105,15 @@ export class AuthController { | |||
@Post('/refresh') | |||
@HttpCode(HttpStatus.OK) | |||
async refreshToken( | |||
@AuthUser() user: Pure<UserEntity> | |||
@AuthUser() user: Pure<UserEntity> & { isTwoFactorAuthenticated: boolean } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this prop already be in UserEntity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field doesn't exist in the entity because it's not being stored in the db
What does it do?
Describe the technical changes you did.
Why is it needed?
Describe the issue you are solving.
How to test it?
Provide information about the environment and the path to verify the behaviour.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request