Logout Issue using Angular Outh OIDC


#1

Hi,

Am trying to integrate Okta as an Identity provider and facing the issue in log out.
Logout error coming as below:-

I am using Manfredsteyer’ Angular Outh OIDC Library as suggested in one of the Okta Tutorial.

My Application is configured as shown below,

In Logout Redirect URI, I gave absolute path to which I would like my application to be on i.e. my login page.

Below are my configuration and logout component in code.


As I searched around a little, I realized that we can’t provide logout-redirect-uri in code.

Any help is appreciated.

Thank you.


#2

Looks like the post_logout_redirect_uri in the GET request sent to Okta is different from the one defined in the Okta app ( …/login vs …/cbokta).


#3

As per my understanding,

In code, redirectUri : ’ http://localhost:4200/cbokta’ represents that once okta authenticate my users, it redirect them to this path.
But when they logout i want to redirect to ‘http://localhost:4200/login’ which is what i have setup in okta web configuration under “logout redirect URI”. Is my understanding wrong about using “logout redirect URI” configuration.


#4

The login redirect uri is where unauthenticated users will be redirected to when they try to access a protected uri (e.g., ~/account_balance) without proof of authentication (e.g., a session cookie). The logout redirect uri is where users will be redirected to after they click the logout link.

OIDC is strict about matching values in certain fields in the request against those registered at the IDP (the Okta app). The error message is about the mismatch between the logout redirect uri in the GET request and that in the app registration.