Support » Plugin: Login by Auth0 » WP 5.3 Admin Email Check – Fails due to Auth0 Redirection

  • ryansutherlandignite

    (@ryansutherlandignite)


    Hi Josh,

    Problem:

    • Admin Email confirmation from WP 5.3 never finishes its process due to an Auth0 redirect
    • As such, we are asked to confirm the admin email each time we login

    Key Install Details

    • WP 5.3
    • Multisite
    • Auth0 3.11.1

    Description
    As outlined in https://make.wordpress.org/core/2019/10/17/wordpress-5-3-admin-email-verification-screen/ there is now a feature in core which checks if a sites admin email is valid. This functionality stores a timestamp for when the next check should occur. By default its set to 6 months after the email is confirmed.

    However, it appears the admin_email_lifespan option is not being set. During my debuging, I’ve traced this down to the login_auto() funciton of WP_Auth0_LoginManager.php, specifically the check for

    // If the user has a WP session, determine where they should end up and redirect.
    		if ( is_user_logged_in() ) {

    After hitting confirm email, it appears I get pushed through to this condition which then performs a login redirect, and as such the rest of the switch statement for confirm_admin_email in wp-login.php is not completed and therefore the timestamp is not set. I believe this is likely happening as the check in wp-login.php for if ( ! empty( $_POST['correct-admin-email'] ) ) { is failing due to the auth0 redirect happening before it gets to this stage/not passing on the $_POST value

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Josh C

    (@auth0josh)

    @ryansutherlandignite – I appreciate the detailed report here. Give me a bit to look into this get a fix out.

    Plugin Contributor Josh C

    (@auth0josh)

    @ryansutherlandignite – Apologies for the delay here but I’m working on a patch fix for this now. The problem is … I can’t seem to reproduce the behavior that you’re seeing. If I change the admin email address and follow the confirm URL, the address changes as expected.

    That said, the admin email confirm screen isn’t able to appear, which definitely is something we want to fix. That comes from the same area in the plugin but the conditional above.

    If you’re able to modify the plugin to test … can you change the array on this line:

    https://github.com/auth0/wp-auth0/blob/3.11.2-dev/functions.php#L77

    … to include 'confirm_admin_email' and see if that makes a difference? Also, if you have some specific reproduction steps for this, that would help as well.

    Thanks for your patience.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP 5.3 Admin Email Check – Fails due to Auth0 Redirection’ is closed to new replies.