Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 593 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 593 Bytes

angular-auth-frontend

Run develop

Steps:

  1. npm i
  2. npm start

URL: http://localhost:4200

Use Auth Service

1. Import AngularJwtAuthService into component

constructor(...
            private authService: AngularJwtAuthService,
            ...) {}
  ...
];

2. After success login set jwt token

  this.authService.setAuthToken(data.token);

AngularJwtAuthService methods

public getAuthToken(): string {}

public setAuthToken(token: string): void {}

public removeToken(): void {}

public isTokenExpired(): boolean {}