-
Notifications
You must be signed in to change notification settings - Fork 10
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
Check for user verifying platform authenticator (UVPA) #75
Check for user verifying platform authenticator (UVPA) #75
Conversation
This is branched off #74 so it has that work in it too, hence the WIP in the title. Also I want more time to look at this, I just did it today and I'm getting sleepy. |
360641a
to
35d5db8
Compare
This can be bypassed by simply deleting the ``` check_user_verifying_platform_authenticator_available={true} ``` line, or setting it to `false`
Co-authored-by: Owen Bickford <[email protected]>
9635529
to
dcded60
Compare
@type1fool I am considering renaming |
That seems like a good use of an acronym. |
priv/static/registration_hook.js
Outdated
this.handleEvent("registration-challenge", (event) => | ||
this.handleRegistration(event, this) | ||
); | ||
}, | ||
async checkUserVerifyingPlatformAuthenticatorAvailable(context) { | ||
if (!(await window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable())) { | ||
const error = new Error("Registration unavailable. Your device does not support passkeys. Please install a passkey authenticator.") |
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'd like to give devs the ability to tailor this message to their user base. To do that, we may need to move the message into the LiveView. What do you think?
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.
OK I did this with another data-
html attribute.
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 work!
This introduces a hitherto unused check for "user-verifying platform authenticator".