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

Only show "Security Keys" section if "FIDO U2F Security Keys" is enabled #386

Closed
wants to merge 2 commits into from

Conversation

r-a-y
Copy link
Contributor

@r-a-y r-a-y commented Oct 3, 2020

Hi,

This PR only shows the "Security Keys" section if the "FIDO U2F Security Keys" provider is enabled. See #243.

Here's a GIF of the PR:

GIF

If JS is disabled, the "Security Keys" section gets displayed as expected.


I created this PR for better UX. If the "Security Keys" section is shown, but the "FIDO U2F Security Keys" provider is not enabled, this might confuse people thinking that this might be something that needs to be filled in.

I would also recommend changing the Requires an HTTPS connection. Configure your security keys in the "Security Keys" section below. string. I don't think it is necessary to mention Requires an HTTPS connection. Either the server supports HTTPS or it doesn't. The end user doesn't care about this.

Let me know what you think.

@kasparsd
Copy link
Collaborator

kasparsd commented Oct 3, 2020

Thanks for the suggestion @r-a-y!

I agree that the separate location for the security keys is confusing. Ideally, this would be displayed inline the option similar to the other providers.

One issue with the suggested approach is that users can't add or remove the keys unless the feature is enabled. I feel like the security keys section should always be available even when the feature itself is disabled.

I don't think it is necessary to mention Requires an HTTPS connection. Either the server supports HTTPS or it doesn't. The end user doesn't care about this.

This wording was added in #162 after a lot of support requests asking why the feature doesn't work. Users didn't know that HTTPS is required on the login page for this to work. It is added only if the admin area is accessed without the HTTPS so it doesn't display for users with the correct HTTPS setup.

@r-a-y
Copy link
Contributor Author

r-a-y commented Oct 3, 2020

One issue with the suggested approach is that users can't add or remove the keys unless the feature is enabled. I feel like the security keys section should always be available even when the feature itself is disabled.

Maybe we could add a button that says "Configure" and that would toggle and scroll down to the Security Keys section instead?

This wording was added in #162 after a lot of support requests asking why the feature doesn't work. Users didn't know that HTTPS is required on the login page for this to work. It is added only if the admin area is accessed without the HTTPS so it doesn't display for users with the correct HTTPS setup.

Ahh right, I'm testing this locally on a non-HTTPS set up, which is why I'm seeing this wording.

Update: Just tested on a HTTPS connection, the Requires an HTTPS connection string still shows up here:

<?php esc_html_e( 'Requires an HTTPS connection. Configure your security keys in the "Security Keys" section below.', 'two-factor' ); ?>

Perhaps the FIDO provider shouldn't even be enabled if the server doesn't support HTTPS. Shouldn't a simple is_ssl() suffice to make this determination? A lot has changed since #162. HTTPS is more widespread than it was three years ago.

@jeffpaul jeffpaul requested a review from kasparsd April 9, 2021 20:26
@jeffpaul jeffpaul added this to the 0.8.0 milestone Apr 9, 2021
@jeffpaul
Copy link
Member

@kasparsd any thoughts on a review of this PR and whether it's ready for consideration in v0.8.0?

@jeffpaul
Copy link
Member

Given that the approach for the 0.8.0 release is to fully deprecate U2F, the changes in this PR will no longer be relevant. Apologies for the long delay on review here and thank you @r-a-y for your contribution and time.

@jeffpaul jeffpaul closed this Mar 23, 2022
@jeffpaul jeffpaul removed this from the 0.8.0 milestone Mar 23, 2022
@r-a-y r-a-y deleted the try/toggle-security-keys branch January 26, 2023 20:16
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.

3 participants