Angular App: oktaAuth.isAuthenticated() is always false

I was able to get the okta-hosted-login demo running.

I am now trying to transfer the code to my Angular App. However, after I login, oktaAuth.isAuthenticated() is always false.

I get to the Okta login page. After I sign in, I get redirected to my app. But isAuthenticated is still false.

I know I am signed in because if try to LogIn again, I am not redirected to the LogIn page.

Any help would be appreciated.

I was able to figure out this issue.

The problem was I did have access to API | Trusted Origin tab. Once my URI was added, all started working fine.

1 Like

hi i am facing the same issue ,i enabled cors also but issue not resolved and i am using angular 8

What are the error messages in the Browser Tools? Look at both the Browser Tools in both Chrome and Edge

Hey.

I was facing the same issue. Make sure you have the OktaCallbackComponent registered in the routing module and the <router-outlet></router-outlet> in the app.component.html file.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.