Skip to content

Commit

Permalink
Popup para renovação do token
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoCarlito committed Dec 8, 2023
1 parent f01c238 commit b52840c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/app/pages/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ export class ProfileComponent {
});
}

showRenewTokenDialog() {
this.confirmationService.confirm({
message: 'Deseja se manter logado?',
header: 'Confirmação',
key: 'myDialog',
icon: 'pi pi-exclamation-triangle',
accept: () => {
this.renewToken();
},
reject: () => {
this.authService.logout();
},
});
}

renewToken() {
this.authService.refreshToken().subscribe({
next: (response) => {
Expand Down

0 comments on commit b52840c

Please sign in to comment.