[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.
- [reclaim-ui] 167/459: more refactoring and cleanup, (continued)
- [reclaim-ui] 167/459: more refactoring and cleanup, gnunet, 2021/06/11
- [reclaim-ui] 175/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 181/459: actually fix reference name display, gnunet, 2021/06/11
- [reclaim-ui] 200/459: webfinger, gnunet, 2021/06/11
- [reclaim-ui] 170/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 205/459: login via omejdn:api works, gnunet, 2021/06/11
- [reclaim-ui] 185/459: minor fixes, gnunet, 2021/06/11
- [reclaim-ui] 206/459: attestation name added, gnunet, 2021/06/11
- [reclaim-ui] 186/459: update to new API and structure, gnunet, 2021/06/11
- [reclaim-ui] 208/459: store idProvider/Attestation(not working), gnunet, 2021/06/11
- [reclaim-ui] 207/459: improved emailNotFoundAlert,
gnunet <=
- [reclaim-ui] 193/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 189/459: experimental switch added, gnunet, 2021/06/11
- [reclaim-ui] 191/459: update to angular9; minor bugfixes, gnunet, 2021/06/11
- [reclaim-ui] 187/459: add issuer display, gnunet, 2021/06/11
- [reclaim-ui] 216/459: idProvider stored in localStorage and loaded to authorization interface, gnunet, 2021/06/11
- [reclaim-ui] 204/459: merge yarn.lock, gnunet, 2021/06/11
- [reclaim-ui] 192/459: minor fixes, gnunet, 2021/06/11
- [reclaim-ui] 195/459: fix parsing claims parameter, gnunet, 2021/06/11
- [reclaim-ui] 218/459: login works properly, gnunet, 2021/06/11
- [reclaim-ui] 188/459: add expiration, gnunet, 2021/06/11