gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-ui] 221/459: logout on server side works #19


From: gnunet
Subject: [reclaim-ui] 221/459: logout on server side works #19
Date: Fri, 11 Jun 2021 23:25:13 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository reclaim-ui.

commit 9d8d8e7b8024a68c50648cec57eec4bfc7944622
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Mon Jun 22 11:12:06 2020 +0200

    logout on server side works #19
---
 src/app/attestation.service.ts                   |  8 ++++----
 src/app/edit-identity/edit-identity.component.ts | 23 ++++++++---------------
 2 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/src/app/attestation.service.ts b/src/app/attestation.service.ts
index 920f2ad..67139e4 100644
--- a/src/app/attestation.service.ts
+++ b/src/app/attestation.service.ts
@@ -21,6 +21,10 @@ export class AttestationService {
       
           // URL of the SPA to redirect the user to after login
           redirectUri: window.location.href,
+
+          postLogoutRedirectUri: window.location.href,
+
+          logoutUrl: idProvider + '/logout',
       
           // The SPA's id. The SPA is registerd with this id at the auth-server
           // clientId: 'server.code',
@@ -46,8 +50,4 @@ export class AttestationService {
         return authCodeFlowConfig;
     }
 
-    serversideLogout(idProvider: string){
-      return this.http.get<any>(idProvider + '/logout');
-    }
-
 }
\ No newline at end of file
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index 6c7ed24..a28d7e3 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -711,16 +711,20 @@ export class EditIdentityComponent implements OnInit {
       this.newIdProvider = '';
       localStorage.removeItem('newIdProvider');
       this.updateAttestations();
+      this.newAttestation.name = '';
+      this.newAttestation.value = '';
+      this.logOutFromOauthService();
     },
     err => {
       console.log("Failed saving attestation");
       console.log(err);
       //this.errorInfos.push("Failed to update identity ``" +  
this.identityInEdit.name + "''");
       EMPTY
+      this.newAttestation.name = '';
+      this.newAttestation.value = '';
+      this.logOutFromOauthService();
     });
-    this.newAttestation.name = '';
-    this.newAttestation.value = '';
-    this.logOutFromOauthService
+
   }
 
   attestationNameDuplicate(){
@@ -752,7 +756,6 @@ export class EditIdentityComponent implements OnInit {
 
   grantedAccessToIdProvider(){
     if (this.oauthService.hasValidAccessToken()){
-      console.log("logged in");
       return true;
     };
     return false;
@@ -789,17 +792,7 @@ export class EditIdentityComponent implements OnInit {
     if (!this.oauthService.hasValidAccessToken()){
       return;
     }
-    const idProvider = this.oauthService.issuer;
-    this.oauthService.logOut();
-    this.attestationService.serversideLogout(idProvider).subscribe(res => {
-      console.log("logged out on server")},
-      error => {
-        console.log("serverside logout gone wrong");
-        console.log(error);}
-    );
-    if (!this.oauthService.hasValidAccessToken()){
-      console.log("logged out from outhService");
-    }
+    this.oauthService.logOut(false);
   }
 
   cancleLinking(){

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]