You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have multiple sites connected to Auth0 for authentication, but some sites, request partial usage of WP Login and Auth0. For example, Customers, who should only access one site, and are managed only by that site, should login via the standard WooCommerce/Wordpress Login Forms (e.g. via my account), while administrators should login via auth0 (via wp-admin or wp-login).
We need a method to allow, programmatically, the ability to disable auth0 for specific pages.
Describe the ideal solution
Purposed Solution:
Modify 'wp_auth0_login_override_url' function to become pluggable, allowing flexible function that can be overwritten with custom logic.
Tested on existing code base, the following, which allows normal user authentication on the Front Page, WooCommerce Pages, My Account Page:
functionwp_auth0_login_override_url( $login_url = null ) {
// Check if the current page is home, a WooCommerce page, or an account pageif (is_home() || is_woocommerce() || is_account_page()) {
// If one of these conditions is true, return the default login URL without any modificationsreturn wp_login_url();
}
$wle = wp_auth0_get_option('wordpress_login_enabled');
if ('no' === $wle) {
return'';
}
$wle_code = '';
if ('code' === $wle) {
$wle_code = wp_auth0_get_option('wle_code');
}
$login_url = $login_url ?: wp_login_url();
return add_query_arg('wle', $wle_code, $login_url);
}
Additional context
No response
The text was updated successfully, but these errors were encountered:
Checklist
Describe the problem you'd like to have solved
We have multiple sites connected to Auth0 for authentication, but some sites, request partial usage of WP Login and Auth0. For example, Customers, who should only access one site, and are managed only by that site, should login via the standard WooCommerce/Wordpress Login Forms (e.g. via my account), while administrators should login via auth0 (via wp-admin or wp-login).
We need a method to allow, programmatically, the ability to disable auth0 for specific pages.
Describe the ideal solution
Purposed Solution:
Modify 'wp_auth0_login_override_url' function to become pluggable, allowing flexible function that can be overwritten with custom logic.
From this:
To this:
Alternatives and current workarounds
Tested on existing code base, the following, which allows normal user authentication on the Front Page, WooCommerce Pages, My Account Page:
Additional context
No response
The text was updated successfully, but these errors were encountered: