Skip to content

mad-coders/angular-authentication

Repository files navigation

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 {}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published