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

OTP with Multisite may not work #583

Closed
javiercasares opened this issue Jul 21, 2023 · 2 comments
Closed

OTP with Multisite may not work #583

javiercasares opened this issue Jul 21, 2023 · 2 comments

Comments

@javiercasares
Copy link

Is your enhancement related to a problem? Please describe.

In some cases, the OPT option won't work with WordPress Multisite.

OTP usually uses the hostname to create the value, and WP Multisite allows having multiple hostname (subdomains or full different domains) and, if you create the access in one site, it doesn't work with the other.

As creating a different QR/config for each site is not a reallity, maybe the opton to disable the OTP option when Multisite may be the option.

This also may not work with FIDO.

Email, for example, works fine.

Proposed Solution

When Multisite (or always) having the option for admins to allow / disallow some 2FA options.

In the case is a Multisite, explain the possibility that OTP/FIDO may not work.

Designs

No response

Describe alternatives you've considered

No response

Please confirm that you have searched existing issues in this repository.

Yes

@dd32
Copy link
Member

dd32 commented Jul 24, 2023

OTP usually uses the hostname to create the value

Assuming you're referring to TOTP here, the hostname is included in the description, but is not used within the validation flow for it. The Key is per-user, but not per-hostname.

@kasparsd
Copy link
Collaborator

It should be only FIDO U2F which locks the secret to a hostname but that is being removed soon due to #423.

The TOTP secret is stored in user meta:

public function set_user_totp_key( $user_id, $key ) {
return update_user_meta( $user_id, self::SECRET_META_KEY, $key );
}

which is a global table shared across all sites on the network. I'm personally using the same TOTP key on all my sites of a multisite.

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

No branches or pull requests

3 participants