-
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
[BUG] - Does not work on Safari MacOS and iOS #63
Comments
Thank you, @kevmodrome. I can confirm there's some issue with Safari on iOS, and I suspect it's the autofill feature that was recently added. I will look into this and follow up when I have a moment. |
That is what I see on MacOS / Safari. it seems that webauthn can only be triggered by a "user action", so potentially the call to trigger the webauthn has to come from a click directly? Note, I see the errors in the post above( not allowed error) in my JS console, directly after the above screenshot. See this post, and the attached bug. https://forums.developer.apple.com/forums/thread/747036 |
Interesting. It seems that Passkey autofill isn't currently supported in iOS, but that is likely to change. I'm investigating how to detect whether a user gesture is required. |
When I test this on MacOS Safari, I do get a Passkey prompt and I'm able to sign in without any errors. This is true in private mode, too. In iOS, though, the autofill triggers an error. This web.dev article show an example of detecting conditional UI, which may resolve this error: / Availability of `window.PublicKeyCredential` means WebAuthn is usable.
if (window.PublicKeyCredential &&
PublicKeyCredential.isConditionalMediationAvailable) {
// Check if conditional mediation is available.
const isCMA = await PublicKeyCredential.isConditionalMediationAvailable();
if (isCMA) {
// Call WebAuthn authentication
}
} I have limited bandwidth to push a fix until this weekend. If a PR hasn't been opened already, I will plan on tackling this within the next week. |
This seems to work on Safari MacOS now. |
I have successfully authenticated on an iPhone using a Passkey in a test app. @eadz Are you still seeing errors? |
I'm still seeing issues on iOS. Is there a new version I can try out on my end? (Pretty unfamiliar with the whole Elixir ecosystem so unsure how I would clone this and just copy it into my project) |
@kevmodrome The latest version is 0.7.0 from December 2023. Could you use Safari Devtools to view errors in the console? Update: I re-read the original post and removed some of my questions that were already answered above. |
Well, I can't even get to the sign in page since I'm getting kicked out of the page on iOS 😬 |
Are you still seeing this in the IEx shell when that happens?
|
Description
Running into issues where I can't use this on Safari. Both iOS and MacOS versions fail with different error messages.
On iOS I get a flash message when I go to the sign-in route that says "Passkeys not supported on this browser."
On MacOS I get errors in the console:
To end on a positive note - both Firefox and Chrome on MacOS works as expected and across browsers! UX is 👌
Steps To Reproduce
Steps to reproduce the behavior:
ecto.create
wac.install
/sign-in
Expected behavior
I should be able to sign up and login like on Chrome and Firefox.
Desktop (please complete the following information)
Smartphone (please complete the following information)
AdditionalCcontext
Add any other context about the problem here.
Notify
The text was updated successfully, but these errors were encountered: