Support » Plugin: Login by Auth0 » Resend Email Verification Not working in new version

  • Resolved Ajay Ghaghretiya

    (@ajayghaghretiya1)


    Hello Josh,

    We are facing the issue after updating the latest version of the plugin on our website.

    We are using the latest version of the Lock Js.

    Here I have mentioned the steps which we have followed to update the plugin.

    1. We have downloaded the latest version of the plugin from wordpress.org also we have installed and active it on our development server.

    2. We have configured all the settings that are required for Auth0 login and registration functionality.

    3. We have tried to register with the new email address. User registered successfully by Auth0 and we have got the account verification email on the email address.

    4. After Registration successfully it redirects to the page that says The sites requires a verified email address and also there is the link for “Resend Verification Email”.

    5. When we click on “Resend Verification Email” then one alert box is displayed that says “Something went wrong: please login and try again.” and we do not get the account verification email again.

    Here I have mentioned our development server URL where you can register and check the “Resend Verification Email” functionality.

    Development server URL: http://writingroad.dev1.in/
    It would be great if you can check this issue and let us know your thoughts/inputs about the same.

    Thanks,
    Ajay

    The page I need help with: [log in to see the link]

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

    (@auth0josh)

    Hi @ajayghaghretiya1,

    Sorry for the trouble here. I just tested that out on your development server and, indeed, it does the same thing for me as well. It looks like the email send request is failing on the server, not in the client.

    A few questions:

    – What version were you upgrading from?
    – Can you check the plugin error log (wp-admin > Auth0 > Error Log) and see if there are any entries there that are helpful?
    – Can you do the same with your PHP error log as well?
    – What version of PHP? WordPress?

    Thanks!

    Hello Josh,

    Thanks for your quick reply. Here are the answers of your questions:

    1. What version were you upgrading from?
    >>> We have upgraded from 3.3.1 version to 3.6.1 version of the plugin.

    2. Can you check the plugin error log (wp-admin > Auth0 > Error Log) and see if there are any entries there that are helpful?
    >>> You can find the plugin error log from here: “https://drive.google.com/file/d/1_WwYnhWgM6gAnFazVCjqmbNJDJNJWLFH/view?usp=sharing”.

    3. Can you do the same with your PHP error log as well?
    >>> Same error shown in PHP error log like ‘[29-Jun-2018 05:42:33 UTC] {“statusCode”:401,”error”:”Unauthorized”,”message”:”Bad audience: https://writingroad.eu.auth0.com/api/v2/”}’.

    4. What version of PHP? WordPress?
    >>> We are using PHP version 7 on our development server and on the live site we have PHP version 5.4.16.

    Please do the needful in this issue so I may get solution as earlier as possible.

    Thanks & Regards,
    Ajay

    Plugin Contributor Josh C

    (@auth0josh)

    @ajayghaghretiya1

    The relevant log is actually the one about the Client Credentials grant being missing. Start here:

    https://auth0.com/docs/cms/wordpress/configuration#application-setup

    … scroll down to step 11 and follow that. Then walk through the next section:

    https://auth0.com/docs/cms/wordpress/configuration#authorize-the-application-for-the-management-api

    That should get your configuration where it needs to be.

    Also, you can take down the error log screenshot now since that has some sensitive information.

    Hello Josh,

    Thanks for providing the settings details of the Auth0.
    We have checked that the settings in the Auth0 panel match the recommended settings.

    We have found One exception: the OIDC conformant setting is no longer present in the current version of Auth0.

    Please do let us know your thoughts about the same.

    Thanks
    Ajay

    Hello Josh,

    Also, we have checked the Resend email verification functionality after updating the settings as you have provided us.

    I have attached the screenshot link below of the issue:
    https://ibb.co/cmr798

    Please review it and let us know your thoughts/inputs about the same.

    Thank you,
    Ajay

    Plugin Contributor Josh C

    (@auth0josh)

    @ajayghaghretiya1 – All the settings mentioned in that doc are Auth0 dashboard settings. Just to confirm, you turned on the Client Credentials grant for your Application and turned on that same Application for the Management API, using the scopes listed?

    Can you test that one more time and see what, if anything appears in the plugin error log?

    Thanks!

    Hello Josh,

    We have double check our settings of the plugin also checked on the Auth0 application settings.

    When we will refresh the page of the above screenshot that I have provided in our previous comment then it will occur the state code error. We have also reviewed the one of the support thread about the state code issue(https://community.auth0.com/t/invalid-state-error-during-auth0-wordpress-redirect/12552/9 ).

    Here, I have attached the error screenshots of the plugin and state code issue.
    https://ibb.co/fLA7cT
    https://ibb.co/bvVUro

    Please Advice!

    Thanks,
    Ajay

    Plugin Contributor Josh C

    (@auth0josh)

    @ajayghaghretiya1

    The state issue is expected when you refresh the page as it’s already validated what it needs to and deleted the value.

    Are you still having the email verification issue? If so, you’ll need to do a little digging on your side to see why that’s failing. Success/fail check happens here:

    https://github.com/auth0/wp-auth0/blob/master/lib/WP_Auth0_Email_Verification.php#L63

    Where the action actually happens is here:

    https://github.com/auth0/wp-auth0/blob/master/lib/WP_Auth0_Api_Client.php#L300

    Output that $response variable in a test install and see what happens. Also check that you’re getting a token with this:

    https://github.com/auth0/wp-auth0/blob/master/lib/WP_Auth0_Api_Client.php#L230

    You can output both of those in a mu-plugin or in a debug console environment to see what’s happening. Without more information about what is failing, there’s not a lot I can do.

    Hello Josh,

    Thanks for the details. We will follow the above steps and let you know for the same.

    Thanks,
    Aj

    Hello Josh,

    I have deeply looked into the plugin code and debugged the Ajax called but the Ajax function not calling and it returns some HTML code rather than success or failure. Still, I am looking into this and if I will need any help from you then let you know for the same.

    Thanks

    Hello Josh,

    Thanks for your supports. We have fixed this issue.

    Much appreciated.

    Thanks,
    Aj

    Plugin Contributor Josh C

    (@auth0josh)

    Great to hear! Thanks for checking back in.

    Can you summarize what the issue was in case someone else comes across this?

    Hello Josh,

    our developer has more looked into this and found that some code of our functions.php that are checking the [‘DOING_AJAX’] every time when you called the Ajax. but we were not getting this parameter from the ajax call of “Resend Verification Email” that’s why it prevents your ajax call.

    We are using the [‘DOING_AJAX’] for the security purpose can we add this to the plugin when calling Ajax. Please do let me know your thoughts about the same.

    Thanks,
    Aj

    Plugin Contributor Josh C

    (@auth0josh)

    @ajayghaghretiya1 – We’re using core AJAX hooks along with check_ajax_referrer, which checks DOING_AJAX itself. The DOING_AJAX constant is set at the top of the admin-ajax.php file so there’s no reason to set it directly.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Resend Email Verification Not working in new version’ is closed to new replies.