-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(u2f): disabled enrolling the same device for u2f #29276
Conversation
size-limit report
|
promise = u2f.sign(this.props.challengeData.authenticateRequests); | ||
} else if (this.props.flowMode === 'enroll') { | ||
const {registerRequests, registeredKeys} = this.props.challengeData; | ||
promise = u2f.register(registerRequests as any, registeredKeys as any); |
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.
do you need the as any
?
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 believe so, i think it failed the linting checks without it since register doesn't take registeredKeys in the api function
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.
👍🏼
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.
looks good!
A user will no longer be able to enrol the same u2f device twice.
u2f.register() with registeredKeys passed in will error if the device is been registered already. If so, we want to display that it has been registered and not allow the user to continue with adding a u2f key.
Solves: https://getsentry.atlassian.net/browse/ER-640
https://getsentry.atlassian.net/browse/ER-642