-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(passport): Passkeys #2659
feat(passport): Passkeys #2659
Conversation
apps/passport/.dev.vars.example
Outdated
@@ -21,3 +21,4 @@ SECRET_APPLE_OAUTH_CLIENT_SECRET="" | |||
INTERNAL_DISCORD_OAUTH_CLIENT_ID="" | |||
SECRET_DISCORD_OAUTH_CLIENT_SECRET="" | |||
|
|||
SECRET_WEBAUTHN_SIGNING_KEY='' |
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.
SECRET_WEBAUTHN_SIGNING_KEY='' | |
SECRET_WEBAUTHN_SIGNING_KEY='' | |
registrationOptions && | ||
registrationOptions.challenge && |
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.
registrationOptions && | |
registrationOptions.challenge && | |
registrationOptions?.challenge && |
if (e instanceof errors.JWTExpired) | ||
throw new BadRequestError({ | ||
message: | ||
'Passkey request authentication has expired. Please try again.', | ||
}) |
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.
Would an else
clause needed?
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.
Added
|
||
if ( | ||
!registrationPayload.nickname || | ||
(registrationPayload.nickname && registrationPayload.nickname.length < 4) |
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.
(registrationPayload.nickname && registrationPayload.nickname.length < 4) | |
(registrationPayload.nickname?.length <= 3) |
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.
Keeping the number in the condition as it matches with the error message. Addressed the null item.
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.
but the error message says 4 or more. It doesn't accept 4 letter names.
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.
Good catch, though that was happening in the component, and not this bit of code. Updated the component condition to be the same < 4
so should be consistent in front and backend.
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.
I just searched for < 4
and posted the comment. I wasn't paying enough attention 🤭
Description
Implements registration and login of passkeys
Related Issues
Testing
Checklist