angular-auth-oidc-client icon indicating copy to clipboard operation
angular-auth-oidc-client copied to clipboard

Session keep changing and going in loop, when browser extensions like Grammarly are installed.

Open Liviano opened this issue 2 years ago • 3 comments

Version: 14.1.1

Question In my angular application, I am using angular-auth-oidc-client, To check the session status, I am subscribing to the checkSessionChanged$ variable. When browser extensions like Grammarly are installed, they try to use the OIDC, and the session changes are returning true as a result the application is going in a loop.

Is any one facing this issue? Is there any solution for this?

Liviano avatar Jun 27 '23 18:06 Liviano

Are you sure that it's Grammarly that is causing this issue? I also have Grammarly installed, but I don't encounter that issue. (We're on v15 of this library)

timdeschryver avatar Jun 28 '23 06:06 timdeschryver

When I remove the add-on, it works fine, but when I add the extension, it causes this issue. Below is my configuration.

I upgraded my version to 15.0.5, even after that am getting the issue. Below is my configuration, please let me know if am missing anything.

const configuration: OpenIdConfiguration = { authority: stripTrailingSlash(issuer), redirectUrl: location.protocol + '//' + location.host + '/app/', clientId: clientId, scope: scopes, responseType: 'code', triggerAuthorizationResultEvent: true, postLogoutRedirectUri: location.protocol + '//' + location.host + '/app/', startCheckSession: true, renewTimeBeforeTokenExpiresInSeconds: 60, silentRenew: true, silentRenewUrl: location.protocol + '//' + location.host + '/app/silent-renew.html', forbiddenRoute: '/out/forbidden', unauthorizedRoute: '/out/unauthorized', disableIatOffsetValidation: disableIatOffsetValidation, maxIdTokenIatOffsetAllowedInSeconds: maxIdTokenIatOffsetAllowedInSeconds, logLevel: logLevel, autoUserInfo: autoUserInfo };

Liviano avatar Jun 28 '23 13:06 Liviano

Can i subscribe to isAuthenticated$ instead of checkSessionChanged$, if session changes am redirecting to logout screen. Instead if authentication comes as false i will redirect to logout. Will this work?

Liviano avatar Jul 06 '23 08:07 Liviano