Checklist
Description
redirect_to is a standard WordPress convention. wp_login_form(), wp_loginout(), and core's own wp-login.php all use it to send a user back to whatever page they were trying to reach before being prompted to authenticate. v4 of this plugin supported it as a first-class, documented feature but for whatever reason, this support is missing in v5.
Reproduction
- As a logged-out user (or with an expired session), visit any deep admin URL requiring login, e.g.
wp-admin/edit.php?post_type=page.
- Complete login via Auth0.
- Observe you land on the dashboard/site root instead of back on the page list you were trying to reach.
Additional context
v4 implementation for reference: request parsing in WP_Auth0_LoginManager.php:71-73, threaded through state in WP_Auth0_Lock.php:34-37 and get_authorize_params() (~461-503), honored on callback at WP_Auth0_LoginManager.php:237-238, documented in readme.txt:64.
Suggested fix: capture $_REQUEST['redirect_to'], thread through the state param sent to Auth0, validate with wp_validate_redirect() on return, use as the final destination.
wp-auth0 version
5.6.1
WordPress version
7.1
PHP version
8.4
Checklist
Description
redirect_tois a standard WordPress convention.wp_login_form(),wp_loginout(), and core's ownwp-login.phpall use it to send a user back to whatever page they were trying to reach before being prompted to authenticate. v4 of this plugin supported it as a first-class, documented feature but for whatever reason, this support is missing in v5.Reproduction
wp-admin/edit.php?post_type=page.Additional context
v4 implementation for reference: request parsing in
WP_Auth0_LoginManager.php:71-73, threaded through state inWP_Auth0_Lock.php:34-37andget_authorize_params()(~461-503), honored on callback atWP_Auth0_LoginManager.php:237-238, documented inreadme.txt:64.Suggested fix: capture
$_REQUEST['redirect_to'], thread through thestateparam sent to Auth0, validate withwp_validate_redirect()on return, use as the final destination.wp-auth0 version
5.6.1
WordPress version
7.1
PHP version
8.4