Skip to content

Commit

Permalink
Implementação de atualização de tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoCarlito committed Dec 8, 2023
1 parent 0f26e0f commit 1041d0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export class AuthService {
const token = localStorage.getItem('token');
return !!token;
}


refreshToken(): Observable<any> {
return this.http.post(`${this.usersAPIURL}/auth/refresh`, null);
}

logout(): void {
localStorage.removeItem('token');
this.router.navigate(['/login']);
Expand Down

0 comments on commit 1041d0f

Please sign in to comment.