Hello, we are currently doing some testing for integrating OKTA for our React.js application for a client and came across some issues similar to this one : Local to Test/QA Server Application Testing. with the primary difference being the language, with ours being a React SPA. We pretty much followed the implicit flow for react as described here : https://developer.okta.com/code/react/okta_react.
It would run perfectly when running it on localhost serving it through npm start or building it and deploy to server with localhost configurations, however - when we build using the domain name such as http://vmtest.company.com:8551 instead of http://localhost:8551 it wouldn’t resolve the callback coming after you log in. We’re able to log in but when it redirects we get a 404 error as well; see attached image.
I have a very similar issue trying to build the login for an angular app.
It works fine for localhost, but as soon as I change the hardcoded values to my domain and deploy it on my server, it just redirects to mydomain.com/implicit/callback and displays a 404.
Are you sure your account settings are not still set to your local callback urls? The setting is under “Applications > Your app > General > Login redirect URIs”. If you have different callback urls for different environments, you will need a separate application setup for each.
Also, if you have a custom authorization server, make sure you have the CORS redirect setup. It’s under “API > Trusted Origins > Add Origin”.