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