call backend after successful login;

This commit is contained in:
Marco Zeisler 2021-03-21 20:40:00 +01:00
parent 7a9e2395ef
commit 38086513df
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<button mat-raised-button (click)="gotoBackend()">Call Backend</button> <!--<button mat-raised-button (click)="gotoBackend()">Call Backend</button>-->
<span id="loginBtnWrapper"> <span id="loginBtnWrapper">
<button *ngIf="!parsedToken" <button *ngIf="!parsedToken"
mat-raised-button color="primary" mat-raised-button color="primary"

View File

@ -32,6 +32,7 @@ export class LoginComponent implements OnInit {
if (split[0] === 'id_token') { if (split[0] === 'id_token') {
this.id_token = split[1]; this.id_token = split[1];
this.parsedToken = JSON.parse(atob(this.id_token.split('.')[1])); this.parsedToken = JSON.parse(atob(this.id_token.split('.')[1]));
this.gotoBackend();
} else if (split[0] === 'state') { } else if (split[0] === 'state') {
this.state = split[1]; this.state = split[1];
} }