React sign in widget giving error

I’m busy trying to follow this tutorial https://developer.okta.com/code/react/okta_react_sign-in_widget/

My app seems to be working and i get the login widget and 2fa then the app redirects to the /implicit/callback page and renders out “AuthApiError” if I comment out these lines from Login.js

return this.props.auth.redirect({

    sessionToken: res.session.token

  });

And i log out the res variable I can see that i got auth succeeded and a token was returned.

Looking at the call history in dev tools i see this result

  1. Request URL:

https://company.okta.com/oauth2/v1/token

  1. Request Method:

POST

  1. Status Code:

401

  1. error: “invalid_client”
  2. error_description: “Client authentication failed. Either the client or the client credentials are invalid.”

nevermind. Didn’t have it set up as a single page app

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