Wordpress User Migration Unexpected token '{'"

Hi,

I’m trying to set up gradual user migration and went through all the steps in this article, including the troubleshooting section: https://auth0.com/docs/cms/wordpress-plugin/user-migration-in-login-by-auth0.

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

-Jerime

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:
https://auth0.com/docs/cms/wordpress-plugin/user-migration-in-login-by-auth0?_ga=2.154745776.985279639.1626237714-1600770031.1626237714&_gl=1*rh7kdo*rollup_ga*MTYwMDc3MDAzMS4xNjI2MjM3NzE0*rollup_ga_F1G3E656YZ*MTYyNjQ0OTg3OS44LjEuMTYyNjQ1MDA1Mi4yOA

-Jerime

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.