From c18628e22c1d699f8dc1971454baf6330194f756 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN <yui.heero@gmail.com> Date: Wed, 8 Jun 2022 00:28:39 +0200 Subject: [PATCH] [DEV] try to prenvent connection LOOP --- front/src/app/service/user.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/front/src/app/service/user.ts b/front/src/app/service/user.ts index e5b79c2..8ddc0f4 100644 --- a/front/src/app/service/user.ts +++ b/front/src/app/service/user.ts @@ -106,7 +106,9 @@ export class UserService { }).catch(() => { // jump in the sign-in page (automatically of request remember-me) if(rememberMe) { - // just to the sso !!! + // jump to the sso !!! (remove local data to prevent login loop) + this.storageService.remove(this.cookiesRememberMe); + this.storageService.removeSession(this.cookiesToken); self.ssoService.requestSignIn(); reject(); } @@ -115,7 +117,9 @@ export class UserService { } else { console.log(`Get previous connection ... `); if(rememberMe) { - // just to the sso !!! + // jump to the sso !!! (remove local data to prevent login loop) + this.storageService.remove(this.cookiesRememberMe); + this.storageService.removeSession(this.cookiesToken); self.ssoService.requestSignIn(); reject(); }