I’m using the Auth0 wordpress plugin 3.4.0, but having a few issues. Here’s the first one I’m trying to solve:
- We create new users via the Auth0 Management API via a separate signup app.
- To give the user access to their account, we send a passwordless login link to the user, which then redirects them to the Wordpress site.
- The user is successfully logged in to Wordpress; an account is created for them, but has the default ‘change_this_email@’ address, implying no user data was passed across.
- When we try to use the ‘get_currentauth0userinfo’ method in the wpa0_user_created hook, we can’t access the API. The resulting object is below:
[statusCode] => 401
[error] => Unauthorized
[message] => Invalid token
[attributes] => stdClass Object
[error] => Invalid token
I suspect that the app is successfully validating the auth code supplied after auth0 login (because a new blank user is created), but is then failing to exchange that for an access token for further communication with the app. I’m missing something, but I’m not sure what it could be. Any ideas?