We’re building a React & Typescript app and using @okta/okta-react. When I first log in everything seems fine and the token in local storage has an accessToken property and an idToken property. After some amount of time (the token timeout period? token time out + token reresh time out?) if I look in local storage I am in the state where my okta token in local storage has an idToken property but no accessToken property. Attempting to refresh the app at this point does not redirect me to the login page. Additionally once I am in this state isAuthenticated in the okta react hook seems to think I am authenticated.
If I pull down the “okta hosted login / okta-react-example” project and manually edit the Okta Token in local storage I can recreate the same behavior.
- What causes me to get into that state in the first place - can I prevent it?
- If I can’t prevent it then what can I do to get back into an authenticated state with a valid accessToken?