I’m trying to develop a sign-in page with react that allows our users to log in once and then navigate to other apps without having to log in again. What this means is that a user would sign in on
auth.mydomain.com and be able to acces
During development I have the sign-in widget on port
8080 and my app on port
3000. Right now I can log in on port
8080 and get redirected to port
After doing so,
authState.isAuthenticated is false. I can go 2 separate ways from here. I can get the tokens using
oktaAuth.token.getWithoutPrompt() but this does not update
authState, neither does executing
oktaAuth.authStateManager.updateAuthState() right after. The other way is to trigger a login with
oktaAuth.signInWithRedirect() which updates
authState, but this reloads the page and wrecks user experience.
Here are the versions I’m using:
"@okta/okta-auth-js": "^6.7.1", "@okta/okta-signin-widget": "^6.5.0", "@okta/okta-react": "^6.5.0"
okta-signin-widget is not present on the app in port