Wordpress User Migration Unexpected token '{'"


I’m trying to set up gradual user migration and went through all the steps in this article, including the troubleshooting section: User Migration in Login by Auth0 WordPress Plugin.

The “Get User” tab test works, but the “Login” tab test does not work. I get this error:
“Invalid response code from the auth0-sandbox: HTTP 400. Unexpected token ‘{’”

I checked the migrationToken and the endpointUrl key values and they are correct.
I searched the Auth0 Community for possible solutions, but have yet to find one.

Any help would be appreciated.

WordPress plugin version:4.2.0.
Auth0 Free tier plan


Hello again,

This is the solution:
As I was reviewing the script and re-reading the auth0 article I retrieved the instructions from, I noticed that the article has an incorrect link.

Step 8 reads: “Select the Login view, clear out the existing code, copy the db-login.js code from the GitHub repository, and paste it into the code editor.”

This sentence has a link, but the link actually points to db-get-user.js. Meaning that I was using the wrong script. I was able to find it by replacing the js name with the correct one in the URL.

Article link:
User Migration in Login by Auth0 WordPress Pluginrh7kdorollup_gaMTYwMDc3MDAzMS4xNjI2MjM3NzE0rollup_ga_F1G3E656YZ*MTYyNjQ0OTg3OS44LjEuMTYyNjQ1MDA1Mi4yOA…


1 Like

Glad you have figured it out and thanks for sharing it with the rest of community!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.