Skip to content

Commit

Permalink
Merge branch 'hotfix/set-auth'
Browse files Browse the repository at this point in the history
  • Loading branch information
randilfernando committed Dec 25, 2017
2 parents 49c037c + 88fc427 commit e1f0f01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "simple-angular-jwt-auth",
"description": "authentication package for angular 5 using HttpClientModule",
"author": "[email protected]",
"version": "0.0.2",
"version": "0.0.4",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down
4 changes: 2 additions & 2 deletions src/modules/auth/providers/auth.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ export class AuthProvider {
[auth.accessToken, auth.refreshToken] = await Promise.all([accessTokenPromise, refreshTokenPromise]);
}

return await this.setAuth(auth);
return await this.setAuth(auth, false);
}

public async logOut(): Promise<boolean> {
return await this.clearAuth();
}

public async setAuth(auth: Auth, persist: boolean = true): Promise<boolean> {
if (auth.accessToken === null || this.accessToken === '') {
if (!auth.accessToken || auth.accessToken === '') {
return false;
}

Expand Down

0 comments on commit e1f0f01

Please sign in to comment.