Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP_Auth0_Routes::migration_ws_login, 401 Invalid Credentials #633

Closed
saucompeng opened this issue Mar 15, 2019 · 16 comments
Closed

WP_Auth0_Routes::migration_ws_login, 401 Invalid Credentials #633

saucompeng opened this issue Mar 15, 2019 · 16 comments
Milestone

Comments

@saucompeng
Copy link

saucompeng commented Mar 15, 2019

I add Login by auth0 plugin to my wordpress, I have an error like WP_Auth0_Routes::migration_ws_login, 401 Invalid Credentials when I try Login script at custom database.

Then I install a new wordpress for test to new droplet, I installed plugin successfully. What is the problem at my main wordpress?

@joshcanhelp
Copy link
Contributor

@saucompeng - Thank you for the report here!

A 401 from that endpoint means that the request is not allowed. Do you have Auth0 > Settings > Advanced > "Migration IPs Whitelist" in the plugin turned on? That will restrict by IP address, though the default incoming Auth0 IPs should be whitelisted automatically. Also, check to make sure the Migration Token on the same settings tab matches what it in Auth0 > Connections > Databases > DB connection used > Custom Database tab (both scripts).

@saucompeng
Copy link
Author

Thank you for your response.

I checked what you said. Migration IPs white list comes automaticliy when I use user migration wizard. It's ok. And I checked token which is same both of pages.

When I try "Get User" script, it gets my account information successfully. But Login script says, "Wrong email or password."

@joshcanhelp
Copy link
Contributor

That sounds like you might be using the wrong password, then. The main difference between those 2 scripts is that Get User looks for the existence of a user while Login checks your password. Keep in mind that once the user has been migrated to Auth0 (logged in once with the Auth0 login form, you should see a Delete User Data button on their WordPress profile edit page), the password that's used is in Auth0, not WordPress. Is the password was changed only in Auth0 then it will not be the same as WordPress (which is fine because the Auth0 password is always used).

@saucompeng
Copy link
Author

saucompeng commented Mar 19, 2019

The password is true, I checked again. Same time, my colleague tries with his account, the problem is the same and continues :/

I see now, This error occurs before "invalid credentials" .

WP_Auth0_DBManager::install_db | "kid" invalid, unable to lookup correct key auth0

@joshcanhelp
Copy link
Contributor

Looks like you deleted out the issue template we've got set for this repo so can you tell me what version of the plugin, WordPress, and PHP you're using?

This sounds like an issue with the API token saved but that should only happen when the plugin is updating (judging from the mention of WP_Auth0_DBManager::install_db). Does that error show up in the plugin error log on each attempt at logging in? Can you try deactivating the plugin then reactivating and see if that helps? Also, try generating and saving a new Management API Token in the "API Token" field under the Basic tab in the plugin settings?

@saucompeng
Copy link
Author

Sorry about deleting.

My wordpress version is 5.0.3, Php version: 7.0.32, Woocommerce version: 3.5.4

Does that error show up in the plugin error log on each attempt at logging in?
Only show when I use "User Migration Setup", other login attempts, it gives an error like: "invalid credential"

**Can you try deactivating the plugin then reactivating and see if that helps? **
I've erased and reinstalled the Plugin. Nothing changed.

Also, try generating and saving a new Management API Token in the "API Token" field under the Basic tab in the plugin settings?
I tried it nothing changed, also when reinstalling the plugin, token changing automatically.

@joshcanhelp
Copy link
Contributor

Thanks for that! How about WP-Auth0, is that on the latest?

@saucompeng
Copy link
Author

Thanks for that! How about WP-Auth0, is that on the latest?

Version 3.9.0

@joshcanhelp
Copy link
Contributor

joshcanhelp commented Mar 20, 2019

Alright, that's the latest.

We just published a troubleshooting guide for this:

https://auth0.com/docs/cms/wordpress/user-migration#troubleshooting

You might try running through the manual setup steps as well in case that catches something. Let me know if you get stuck or if one of the steps helps you figure out the issue.

Edit: Troubleshooting page is now live, updated with the link.

@joshcanhelp
Copy link
Contributor

@saucompeng - Were you able to solve your issue here? We're gearing up for a release soon and want to make sure I include any fixes, if needed.

Thanks!

@saucompeng
Copy link
Author

@joshcanhelp I couldn't fix the problem yet. Please help me

@joshcanhelp
Copy link
Contributor

Did you walk through the troubleshooting guide above? What is the error you're seeing when you follow those steps? Did you get stuck anywhere during the steps.

@saucompeng
Copy link
Author

I changed script Line 30 to callback(wpUser.error); it gives an error like "invalid credentials", And I changed my password again, it gives same error also.

@saucompeng
Copy link
Author

Finally, I found the problem. reCaptcha plugin blocks login :( I disabled it and login succesfully.

@joshcanhelp
Copy link
Contributor

Thanks for the update @saucompeng! If you can post a link to the plugin you're using, I'll take a look and see if there's something we can do differently on our end to be more compatible.

@joshcanhelp joshcanhelp added this to the 3.10.0 milestone Apr 1, 2019
@saucompeng
Copy link
Author

https://wordpress.org/plugins/google-captcha/

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants