-
Notifications
You must be signed in to change notification settings - Fork 28
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(WebAuthn): allow multiple credentials per user #29
base: master
Are you sure you want to change the base?
Conversation
return res.status(403).json({ | ||
'status': 'failed', | ||
'message': `${usernameField} ${username} already exists`, | ||
let user = await this.store.get(username) |
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.
IIRC I think level will throw if something doesn't exist in the DB
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 like that's being caught by the adapter
I think this is conflicting due to me merging #24; otherwise the way you're storing the many credentials is straight forward and looks good to me. |
This change allows users to associate multiple credentials to their account. When performing assertions, all the credentials are sent on the `allowList`. When registering a new credential, existing credentials are sent on the `excludeList`. Updated the example to show all the credentials associated to a user. This change is not backwards compatible.
9538886
to
98c0782
Compare
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
+ Coverage 12.66% 24.87% +12.2%
==========================================
Files 5 5
Lines 387 386 -1
==========================================
+ Hits 49 96 +47
+ Misses 338 290 -48
Continue to review full report at Codecov.
|
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 rebased this patch, PTAL.
This change allows users to associate multiple credentials to their
account. When performing assertions, all the credentials are sent on the
allowList
. When registering a new credential, existing credentials aresent on the
excludeList
.Updated the example to show all the credentials associated to a user.
This change is not backwards compatible.
Depends on #24
Fixes #12