-
-
Notifications
You must be signed in to change notification settings - Fork 968
Serve message to user when safari is detected #3674
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
Conversation
Codecov Report
@@ Coverage Diff @@
## webauthn-cli #3674 +/- ##
================================================
- Coverage 98.77% 98.72% -0.05%
================================================
Files 202 201 -1
Lines 5044 5028 -16
================================================
- Hits 4982 4964 -18
- Misses 62 64 +2
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion. Apart from that and @segiddins' suggestion, LGTM.
Wouldn't be possible to make this based on feature check instead of browser check? Is there any way to report on this on the CLI side (is this related to CLI, right?) for potential Safari users? https://stackoverflow.com/a/69783360/319233 |
That's an interesting idea, but I think it'd be out of scope for this PR. We could look at a followup. |
Ahh, I forgot to mention this. Clearly out of this PRs scope. It needs to be integrated into RubyGems itself if I understand it well. Also definitely not blocker, but could be more friendly. |
a54a0d4
to
2e2ebda
Compare
Fix spacing Update translation file
f3a7906
to
4480fe5
Compare
🤔 rebase should fix tests 🙏 |
@simi FYI Shopify/rubygems#106 adds a warning to the command line (it's on a fork since the feature branch is on the fork ruby/rubygems#6560) |
What problem are you solving?
The web socket does not work on Safari due to limitations imposed by Apple. So, we need to direct users away from Safari onto another browser.
What approach did you choose and why?
When Safari is detected, a user will be served a message telling them to use a different browser, and the authentication button will be disabled.
When using Safari:

When not using Safari:

What should reviewers focus on?
Take a gander at the logic added on the prompt page for this. Also, there was some issues when trying to create a test.. I was unable to figure out how to force Capybara to use Safari, documentation on this is very slim. If anyone knows how to do this, please leave a comment!
Testing
You can validate that when using any other browser, the authentication page looks the same as before. Then, you can attempt to authenticate on Safari, and note that the message appears and the authentication button is blocked.