Skip to content

Commit

Permalink
chore(auth): update isAuthenticated predicate (#12838)
Browse files Browse the repository at this point in the history
chore: update isAuthenticated predicate
  • Loading branch information
israx authored Jan 11, 2024
1 parent 59a4aef commit 70a435e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/auth/src/providers/cognito/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export interface OAuthStore {
clearOAuthData(): Promise<void>;
}
function isAuthenticated(tokens?: CognitoAuthTokens | null) {
return tokens?.accessToken && tokens?.idToken;
return tokens?.accessToken || tokens?.idToken;
}

function isAuthenticatedWithRefreshToken(tokens?: CognitoAuthTokens | null) {
Expand Down

0 comments on commit 70a435e

Please sign in to comment.