gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 207/459: improved emailNotFoundAlert


From: gnunet
Subject: [reclaim-ui] 207/459: improved emailNotFoundAlert
Date: Fri, 11 Jun 2021 23:24:59 +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 54718ec0f94e8880e2010823a0828bd5893d1986
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Wed Jun 3 09:04:53 2020 +0200

    improved emailNotFoundAlert
---
 src/app/edit-identity/edit-identity.component.html |  4 ++--
 src/app/edit-identity/edit-identity.component.ts   | 11 ++++++++---
 src/app/oauth-helper.service.ts                    |  4 ++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/app/edit-identity/edit-identity.component.html 
b/src/app/edit-identity/edit-identity.component.html
index de2090f..6619623 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -156,8 +156,8 @@
       <span class="fa fa-warning"></span> This is not a valid e-mail adress
     </div>
     <!--Email not found Warning-->
-    <div *ngIf="!emailNotFoundAlertClosed" class="alert alert-danger 
alert-dismissible fade show my-2" role="alert">
-      <span class="fa fa-warning"></span> No account found with email: 
{{webfingerEmail}}
+    <div *ngIf="!emailNotFoundAlertClosed && webfingerEmail==''" class="alert 
alert-danger alert-dismissible fade show my-2" role="alert">
+      <span class="fa fa-warning"></span> No account found with this email
     </div>
     <button *ngIf="isExperimental() && !idProviderFound()" class="btn 
btn-primary mb-4 fhg-link" (click)="getFhGAttestation()">
       <span class="fa fa-user"></span> Link Fraunhofer Account
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index 5ee56fe..00603bc 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -632,12 +632,14 @@ export class EditIdentityComponent implements OnInit {
       this.idProvider = (idProvider.links [0]).href;
       localStorage.setItem('idProvider', this.idProvider);
       console.log(this.idProvider);
+      this.webfingerEmail == '';
     },
     error => {
       if (error.status == 404){
         this.emailNotFoundAlertClosed = false;
         setTimeout(() => this.emailNotFoundAlertClosed = true, 20000);
       }
+      this.webfingerEmail = '';
       console.log (error);
     });
   }
@@ -661,11 +663,14 @@ export class EditIdentityComponent implements OnInit {
   }
 
   loginFhgAccount(){
-    var authCodeFlowConfig = this.oauthHelperService.getOauthConfig();
+    var authCodeFlowConfig = 
this.oauthHelperService.getOauthConfig(this.identity.name);
     this.oauthService.configure(authCodeFlowConfig);
     this.oauthService.loadDiscoveryDocumentAndLogin();
-    this.getId();
-    this.addAttestation();
+    if (this.getId() == null){
+      console.log("error: can't get id")
+    }
+    localStorage.setItem('idProvider', this.getId());
+    //this.addAttestation();
   }
 
   getId (): any{
diff --git a/src/app/oauth-helper.service.ts b/src/app/oauth-helper.service.ts
index 68c64fd..4c31644 100644
--- a/src/app/oauth-helper.service.ts
+++ b/src/app/oauth-helper.service.ts
@@ -6,13 +6,13 @@ export class OauthHelperService {
 
   constructor() { }
 
-  getOauthConfig(){
+  getOauthConfig(identityName: string){
     const authCodeFlowConfig: AuthConfig = {
       // Url of the Identity Provider
       issuer: localStorage.getItem('idProvider'),
   
       // URL of the SPA to redirect the user to after login
-      redirectUri: window.location.href,
+      redirectUri: window.location.origin + '/edit-attestations/' + 
identityName,
   
       // The SPA's id. The SPA is registerd with this id at the auth-server
       // clientId: 'server.code',

-- 
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]