Error invalid_request - react sign-in widget

Hi everyone! Thanks a lot for the support.

I’ve followed this React tutorial:
https://developer.okta.com/docs/guides/sign-into-spa/react/before-you-begin/

The login action is not wokring, and I’m getting the following warning and error:

[okta-auth-sdk] DEPRECATION: This method has been deprecated, please use signInWithCredentials() instead.

I’m getting this error only when the cerdentials are valid (when they are invalid I’m getting the wanted behaivor):

error.errorCode: invalid_request, error.description: The ‘redirect_uri’ parameter must be a Login redirect URI in the client app settings:

The redirect uri on the application’s settings is the default - localhost:3000/implicit/callback

I’m trying to solve this problem for several hours now, so I would much appriciate any help!
Thanks a lot

Hi there. Just to double check - can you confirm you precede the redirect URI localhost name with http://? In your app’s redirect uri list it should appear as:

http://localhost:3000/implicit/callback

Since Cale handled the second error you are having, I’ll go back and address the first: regarding the deprecation warning you see in the console, are you using renderEl to display the widget, or a different method (showSignInToGetTokens or showSignInAndRedirect)?

There is a GH Issue with a similar report about this deprecation warning and we are tracking an internal ticket to update the Sign In Widget code to avoid this warning message that I recommend you monitor.

When you say the login action is not working, what do you see in the Network events? Is an authorize call being made and is the application getting back tokens?

1 Like