Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis

gdyrrahitis/auth.service.ts Secret

Last active Aug 18, 2018
Embed
What would you like to do?
isAuthenticated() {
const token = localStorage.getItem('token');
return !this.jwtHelper.isTokenExpired(token);
}
getToken() {
return this.jwtHelper.tokenGetter();
}
logout() {
localStorage.removeItem('token');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.