• Hi,

    I’m having a problem with setting up a login via auth0 plugin to our WordPress site. The wizard worked without any problems. I checked again all the settings according to configuration guide and still i get the following error:

    There was a problem with your log in: Access denied. [error code: unauthorized]

    In user detail view i can see failed login attempt as an event “Failed cross origin authentication” and event description “Access Denied”

    Please help cause i ran out of ideas.
    ?ukasz

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Apologies for the trouble here, @lukaszkorona.

    What URL on your site are you seeing this message? Is it after a successful login in Auth0? Are you logging in from /wp-login.php or somewhere else? If so, do you see any errors in the JS console on that page?

    Do you have any relevant logs in Auth0 and/or in the plugin? You mentioned “user detail view” but I’m not sure what that refers to.

    Thanks!

    Thread Starter lukaszkorona

    (@lukaszkorona)

    Hi Josh,

    Thanks for the reply.

    I’m loggin from /wp-login.php. Login is not successful. The message is displayed on following redirect url:
    https://www.taalhammer.com/index.php?auth0=1&error=unauthorized&error_description=Access%20denied.&state=eyJpbnRlcmltIjpmYWxzZSwibm9uY2UiOiI3NGUwY2E0MzhiNDVjMmNmY2MxOWNlZmI5ZDM2YWIwYzllMDIwODljODNkYTA5MzE5Mjc5Y2JhMTEzODYxYjA5In0%3D

    In the console i can see following error message:

    VM191 lock.min.js:9 GET https://www.taalhammer.com/index.php?auth0=1&error=unauthorized&error_description=Access%20denied.&state=eyJpbnRlcmltIjpmYWxzZSwibm9uY2UiOiI3NGUwY2E0MzhiNDVjMmNmY2MxOWNlZmI5ZDM2YWIwYzllMDIwODljODNkYTA5MzE5Mjc5Y2JhMTEzODYxYjA5In0%3D 500 (Internal Server Error)

    By “User detail view” i meant the auth0 dashboard -> users than click on specific user and History

    OK, I just tried that out and see what you’re seeing.

    Can you check the plugin error log at wp-admin > Auth0 > Error Log and see if there’s anything helpful there?

    Also … are you using the User Migration feature? Or do you have any Rules active in the Auth0 dashboard that might be preventing logins?

    Thread Starter lukaszkorona

    (@lukaszkorona)

    There are no error in wp-admin > Auth0 > Error Log

    I didn’t use User Migration. I disn’t set up any rules either. It’s a fresh wordpress install where we wanted to evaluate the plugin and auth0 services.

    I’m not sure where to go with this one, that’s an odd error for what’s happening here. I tested it out on your site with Google and saw the same issue so it’s affecting your whole authentication process.

    I think the best thing to do at this point, since you don’t have anything you need to keep, is start from scratch:

    1. Deactivate and delete the plugin in your WP site
    2. Delete the Application and DB Connection in Auth0
    3. Download and install in WP again (just released 3.8.0 so you’ll get a newer version)
    4. Walk through the Setup Wizard again and note any error log entries once complete.

    Let me know if you run into any issue with this process.

    Thread Starter lukaszkorona

    (@lukaszkorona)

    OK, i’ll do that and let you know about the results. Thanks a lot

    Closed for no activity. Please let me know if we can help any further.

    Thread Starter lukaszkorona

    (@lukaszkorona)

    Hi,

    I finally had some time to do as you suggested. I installed everything from scratch and seems i run into even more strange error. While configuring the plugin, when i was asked to provide password for my own user to synchronize it with auth0 database i got following error: {“error”:”connection is required”}
    When i checked Apache logs i see something went wrong with creating mysql table:
    [Wed Dec 12 22:16:47.410705 2018] [php7:notice] [pid 30887] [client 79.191.87.232:50607] WordPress database error Table ‘wordpress.wp_auth0_user’ doesn’t exist for query SELECT a.*\n\t\t\t\tFROM wp_auth0_user a\n\t\t\t\tJOIN wp_users u ON a.wp_id = u.id; made by activate_plugin, do_action(‘activate_auth0/WP_Auth0.php’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Auth0->install, WP_Auth0_DBManager->install_db, WP_Auth0_DBManager->migrate_users_data, referer: https://136.144.131.123/wp-admin/plugin-install.php?s=auth0&tab=search&type=term
    [Wed Dec 12 22:18:09.302342 2018] [php7:notice] [pid 30886] [client 79.191.87.232:50649] {“error”:”connection is required”}, referer: https://136.144.131.123/wp-admin/admin.php?page=wpa0-setup&step=3&profile=social

    Wordpress version is 5, Ubuntu 18.04, PHP 7.2.10, Auth0 plugin 3.8.1

    When you walk through the setup wizard a second time, it tries to create a new Application and Connection using the name of your site. The Application name does not have to be unique (IIRC) but the Connection name does. So it’s probably creating a new Application but cannot create a new Connection so it fails. If you don’t need to keep data in Auth0 and want to start over, delete the Application and Connection (the latter will delete any associated users in Auth0, not WordPress), deactivate and delete the plugin, then reinstall and go from there.

    The PHP error you mentioned is nothing to worry about and will be removed in the next version.

    Thread Starter lukaszkorona

    (@lukaszkorona)

    Hi,

    You were right with the Connection.

    Unfortunately i ran now exactly into the initial problem with the authentication: “Access denied. [error code: unauthorized]” (Failed cross origin authentication). There is nothing in Apache error log. Plugin error log doesn’t have anything either.

    Any ideas what else i could check? Also should i post it on Auth0 community forum?

    Thanks

    @lukaszkorona – Where is that error message appearing? In the browser after logging in or on the login form or the JS console? Did you check that your site domain is saved in your Auth0 Application settings under “Allowed Web Origins”?

    There are some browser limitations to using the embedded login form (the one that appears on wp-login.php), which are detailed here:

    https://auth0.com/docs/cross-origin-authentication

    The two work-arounds there are:

    1. Upgrade to a paid Auth0 account and enable a custom domain to continue to use the embedded login form.
    2. Turn on “Universal Login Page” under the Features tab in the Auth0 plugin settings and use our hosted login page (does not require a paid account).

    Thread Starter lukaszkorona

    (@lukaszkorona)

    It appears in the browser, after being redirected from auth0. JS console doesn’t display anything. The error is encoded in URL: “https://www.taalhammer.com/index.php?auth0=1&error=unauthorized&error_description=Access%20denied.&state=eyJpbnRlcmltIjpmYWxzZSwibm9uY2UiOiIzODE1MGRkNzIxMzZkMDg4OWQxMDAzNjllMjJkM2QxMjc5Y2ZiYzQ2NmU1OGVlZjc3OTZhMGMxNzYyNTYwNmE0In0%3D” with status code: 500

    Allowed web origins is set to: https://www.taalhammer.com so seems it’s ok.

    My browsers are not blocking third party cookies. I tried with Chrome and Firefox with the same results.

    Ad. 1 We could switch to paid version but we’d like to be sure auth0 fit our needs. That’s why we’d like to see the plugin working before we’ll do further design and development decisions.

    Ad. 2 I enabled “Universal Login Page” and the result is exactly the same except the login form is hosted on https://taalhammer.eu.auth0.com

    (Failed cross origin authentication)

    That was mentioned in an earlier post regarding this same issue. Is that not showing up anymore?

    We could switch to paid version but we’d like to be sure auth0 fit our needs.

    Totally understand. The Universal Login Page avoids the the cross-origin issue just as well, though it sounds like that’s not the issue here.

    Which connection are you using to log in? Just username/email and password? Do you have the User Migration setting turned on (Connections > Database > Connection being used > Custom Database tab > “Use my own database”)? Do you have any Rules activated that might be interfering?

    Sorry again for the trouble here but we’ll help you get this figured out ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Unable to log in with login/pass – Access denied unauthorized’ is closed to new replies.