Not redirecting to the next page after okta-signin

I am trying to build a simple react-app using okta.

I have done the setup such as, at home page I have three links Home, Dashboard and Staff. Without using SecureRoute when I click on links, the specific page loads and shows the data on that specific page.

When I use SecureRoute to Staff page it shows the okta log in page, and after entering the correct credentials it does login but does NOT redirect to the staff page.

It shows the URL as “localhost:3000//login/callback#idtoken={random alphabets}”

You’re using our React SDK, right?

The Security component should be redirecting back to the SecureRoute the user hit once they have been authenticated, as noted in our docs.

Can you test out our sample app to see if you see the same behavior?

I am testing simple app. I can provide my github link so that u can help me out -