From 0ab19bc80310fe2f1d77c128622b091e3b99bc3c Mon Sep 17 00:00:00 2001 From: Israel Arcos Date: Thu, 11 Jan 2024 14:35:00 -0500 Subject: [PATCH] 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) {