Redirect to another route is not happening
Hi,
Followed same as mentioned in example but i need to redirect my app to different route on successful sign in. So as mentioned in documentation i am doing this below const login = async () => { oktaAuth.signInWithRedirect({ originalUri: '/dashboard' }); };
but my dashboard component is not loaded. I see that the URL on the browser is getting changed but react component is not loaded. Maybe the router is not detecting the change from oktaAuth
I have the following route specified in my app.
Thanks for the post!
@oleksandrpravosudko-okta can you help with this?
Hi @pbollaram,
Does /dashboard-bound component load during 'regular' navigation? (i.e. navigating by link or browsing directly onto it)
Would you mind providing details of your router configuration?
yes about /dashboard. I was able to load it if iIrefresh the page with /dashboard URL or when clicked on route
"react-router-dom": "^5.2.0"
Do you happen to have [email protected] installed? There seem to be reports of router not working properly with v5.
No, I am not using that. I have followed another example that you have mentioned(custom-login example). That is letting me sign in and redirection is also happening, but strangely renew token is not working with that.