Hi Team, We are using latest wordpress and latest auth0 plugin. We have created an app on auth0 and allowed salesforce community for login. But when we tried to login, It return an error" “kid” invalid, unable to lookup correct key" Unknow_error. Please let me know why its not working.
Facing same problem.
Sorry for the delay. We were doing our best in providing support to our community recently but it was Christmas time and part of the team was out. I’ll dig into it and reach back in a few hours!
Thanks for understanding!
This looks to be an error with the shared key we use to validate incoming ID tokens on login. The ID tokens being issued from Auth0 should be fine, otherwise we would have a major outage. So there’s something happening with how that key is stored or how it’s being validated.
The first place to start here is the JWKS cache. Go to the plugin settings page, Basic tab, click Delete Cache, set that field to
0, and save changes. Now try the login and see if that works.
While you’re at it, click the “View your JWKS here” link and make sure that something comes up (should be JSON with a
"kid": key somewhere in there).
You can also try making sure:
- The Client Secret in WordPress is correct (copy from the Application settings in Auth0 and paste directly in). Check the base64 encoding setting as well while you’re there.
- The JWT Signature Algorithm in WordPress under the Basic tab matches what’s in Auth0 > Application settings > Advanced (at the bottom) > OAuth tab > “JsonWebToken Signature Algorithm”
Hope that helps and apologies as well for the delay!
Hey @josh.cunningham Thank you for your response it helps but now i am facing different error “There was a problem with your log in: There is a user with the same email. [error code: unknown]” however i have enabled a rule (Link Accounts with Same Email Address & Link Accounts with Same Email Address while Merging Metadata) on auth0 dashboard . Please suggest.
@ashish.perisun - I’m not sure exactly what’s going on there but the error means that the user who just logged in have an email address that exists in WordPress but associated to a different Auth0 ID. If you’re just testing, you can edit the user in WordPress, scroll down, and click Delete Auth0 Data. That will remove the Auth0 user ID in WordPress and allow the new login to associate those accounts. Might be good to check Auth0 > Users to make sure there aren’t also 2 users there (might have happened before the Rule was set).
Hi @josh.cunningham Thank you for your response. I have cleared auth0 data and tried to login it successfully logged me in. however when i tired again it again through the error
“There was a problem with your log in: Invalid state [error code: unknown]”
I have checked logs but even logs is not there, no log data exist.
Thank you for your support so far.
The invalid state could be a number of things but if it only happened once, that might just be using an expired login page or something equally temporary. Clear our your browser cache and try it again. If you’re getting that error regularly, we have a number of troubleshooting steps that will help: