Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mad-coders/angular-authentication
https://github.com/mad-coders/angular-authentication
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mad-coders/angular-authentication
- Owner: mad-coders
- Created: 2019-07-17T05:26:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T08:05:28.000Z (about 2 years ago)
- Last Synced: 2024-12-15T11:33:12.885Z (24 days ago)
- Language: TypeScript
- Size: 1.43 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular-auth-frontend
## Run develop
Steps:
1. npm i
2. npm startURL: http://localhost:4200
## Use Auth Service
### 1. Import AngularJwtAuthService into component
```javascript
constructor(...
private authService: AngularJwtAuthService,
...) {}
...
];
```### 2. After success login set jwt token
```javascript
this.authService.setAuthToken(data.token);
```## AngularJwtAuthService methods
```javascript
public getAuthToken(): string {}public setAuthToken(token: string): void {}
public removeToken(): void {}
public isTokenExpired(): boolean {}
```