Signup results in “AuthSdkError: Unable to parse a token from the url” error

I’m testing one of the stock Okta React sample apps: samples-js-react/okta-hosted-login. Everything works ok if I create a user via the admin interface and let the user finish the process by clicking on “Activate Okta Account” in the activation email. However, if I let the user signup from the login page, and click on the “Activate Account” button in the activation email, I end up on my http://localhost:3000/implicit/callback page, with an error saying “AuthSdkError: Unable to parse a token from the url”. Anyone else run into this?

Hi @sravi

After the user activates his account, you can redirect him to the /authorize endpoint of your Okta org in order for the implicit flow to start and end on http://localhost:3000/implicit/callback, along with the JWT tokens requested.

Hi @dragos,

I’m new to Okta. Can you tell me what changes I would make to the sample code to do what you’re saying? Right now, when the user clicks on “Activate Account” in the email they receive, they get the AuthSdkError message. So the problem is that they can’t even finish activation.

I am having the same issue with the activation email reported by sravi. The activation works. But the error will be confusing to users.

I am using samples-js-react/okta-hosted-login from github. My only change to the sample is to replace port 8080 with 3000 everywhere in the code base. So this is basically an out-of-the-box error. Since I am sure the sample code has been tested as is, I am wondering if the issue has to do with the configuration of my client in Okta.

Unfortunately, I am also new to Okta, and don’t know how to interpret the response by dragos.

If the problem is with the source code of the sample, should the sample be updated to avoid the issue? Would it be possible to get a source code diff for the required changes to fix the problem?

Thanks in advance.