call backend after successful login;
This commit is contained in:
parent
7a9e2395ef
commit
38086513df
@ -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"
|
||||||
|
|||||||
@ -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];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user