How I get okta live site session in my application?

Hello ,

I implemented Okta in my angular5 application using “OpenID Connect Client”. I created a custom form for login and fill username and password.
I implemented it from your blog with custom form.

I have few problem with Okta session. I need that If I logged-in with live Okta website “” and open my application link in new tab with same browser than my application should be auto logged-in with the current session of live Okta and vice-versa for logout. please see attached screen-shot.

Please send me solution what I am looking for.


This will work automatically if you redirect to the /authorize route (start your login process) and you already have an Okta session. Instead of displaying the login page, the browser will immediately be redirect back to your app and you will be signed in.

I coded for it with session exist. Please see my following code

async handleAuthenticationOKta(){
            .then(function(exists) {
            if (exists) {
                console.log("logged in");
  .then(idToken => {
    console.log(`hi ${}!`);
    this.oktaAuth.tokenManager.add('idToken', idToken);
            } else {
                console.log("not logged in");

this code print only “logged in” but it redirection is not working like define services.

So oktaAuth is able to detect a session, but you aren’t able to redirect and stay logged in? How are you doing the redirection?