From 70a435ef94185dcee937a20640e5367f92a44efe Mon Sep 17 00:00:00 2001 From: israx <70438514+israx@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:30:46 -0500 Subject: [PATCH] chore(auth): update isAuthenticated predicate (#12838) chore: update isAuthenticated predicate --- packages/auth/src/providers/cognito/utils/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/src/providers/cognito/utils/types.ts b/packages/auth/src/providers/cognito/utils/types.ts index 71a1f0c5280..82241eeb9c2 100644 --- a/packages/auth/src/providers/cognito/utils/types.ts +++ b/packages/auth/src/providers/cognito/utils/types.ts @@ -128,7 +128,7 @@ export interface OAuthStore { clearOAuthData(): Promise; } function isAuthenticated(tokens?: CognitoAuthTokens | null) { - return tokens?.accessToken && tokens?.idToken; + return tokens?.accessToken || tokens?.idToken; } function isAuthenticatedWithRefreshToken(tokens?: CognitoAuthTokens | null) {