Login/Logout flow React

Hello, we are implementing react okta login flow in our app. We’re using the authService object to logout users and handle getting the token.

The problem arises whenever we logout the user after 1 hour of inactivity. We’re calling the authService.logout() API to push the user out of the program. But when trying to login again using this screen, it says ‘invalid token provided’. To fix that we use the authService.login(’/’) api, which seems backwards, but it allows the user to log back in. Is this the recommended use?

Also, if the user presses the logout button manually, will they be unable to login using that logout redirect when the id_token expires?

So it looks like authService.logout accepts a redirectUri, which I’m assuming I can make that redirectUri be a SecureRoute path and then expect the program to take the user to the login without having the invalid token issue…