Skip to content
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

Conversation

peaceful-james
Copy link
Contributor

This introduces a hitherto unused check for "user-verifying platform authenticator".

@peaceful-james
Copy link
Contributor Author

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.

@peaceful-james peaceful-james force-pushed the check-for-user-verifying-platform-authenticator branch from 360641a to 35d5db8 Compare July 1, 2024 12:34
peaceful-james and others added 4 commits July 2, 2024 11:03
This can be bypassed by simply deleting the

```
check_user_verifying_platform_authenticator_available={true}
```

line, or setting it to `false`
@peaceful-james peaceful-james force-pushed the check-for-user-verifying-platform-authenticator branch from 9635529 to dcded60 Compare July 2, 2024 10:15
@peaceful-james
Copy link
Contributor Author

@type1fool I am considering renaming check_user_verifying_platform_authenticator_available to check_uvpa_available throughout. What do you think? Since it gets its own section in the docs, the acronym is easily found.

@peaceful-james peaceful-james changed the title [WIP] Check for user verifying platform authenticator Check for user verifying platform authenticator Jul 2, 2024
@peaceful-james peaceful-james changed the title Check for user verifying platform authenticator Check for user verifying platform authenticator (UVPA) Jul 2, 2024
@type1fool
Copy link
Collaborator

I am considering renaming check_user_verifying_platform_authenticator_available to check_uvpa_available throughout.

That seems like a good use of an acronym.

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.")
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

@type1fool type1fool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@type1fool type1fool merged commit 2bb677f into liveshowy:main Jul 13, 2024
1 check passed
@peaceful-james peaceful-james deleted the check-for-user-verifying-platform-authenticator branch July 16, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants