From 2bf5630f8bbea7c7bc7f57b5d11dfed07b90ee2a Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Fri, 28 Jun 2024 14:55:37 +0300 Subject: [PATCH] fix(expo): Make useOAuth available to web --- .../expo/src/hooks/{useOAuth => }/useOAuth.ts | 0 packages/expo/src/hooks/useOAuth/index.ts | 1 - packages/expo/src/hooks/useOAuth/useOAuth.web.ts | 15 --------------- 3 files changed, 16 deletions(-) rename packages/expo/src/hooks/{useOAuth => }/useOAuth.ts (100%) delete mode 100644 packages/expo/src/hooks/useOAuth/index.ts delete mode 100644 packages/expo/src/hooks/useOAuth/useOAuth.web.ts diff --git a/packages/expo/src/hooks/useOAuth/useOAuth.ts b/packages/expo/src/hooks/useOAuth.ts similarity index 100% rename from packages/expo/src/hooks/useOAuth/useOAuth.ts rename to packages/expo/src/hooks/useOAuth.ts diff --git a/packages/expo/src/hooks/useOAuth/index.ts b/packages/expo/src/hooks/useOAuth/index.ts deleted file mode 100644 index a7e60d69df..0000000000 --- a/packages/expo/src/hooks/useOAuth/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './useOAuth'; diff --git a/packages/expo/src/hooks/useOAuth/useOAuth.web.ts b/packages/expo/src/hooks/useOAuth/useOAuth.web.ts deleted file mode 100644 index 3621cce6a4..0000000000 --- a/packages/expo/src/hooks/useOAuth/useOAuth.web.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OAuthStrategy } from '@clerk/types'; -import { Platform } from 'react-native'; - -import { errorThrower } from '../../utils/errors'; - -export type UseOAuthFlowParams = { - strategy: OAuthStrategy; - redirectUrl?: string; - unsafeMetadata?: SignUpUnsafeMetadata; -}; -export function useOAuth(_useOAuthParams: UseOAuthFlowParams) { - if (Platform.OS === 'web') { - throw errorThrower.throw('useOAuth hook is not supported in Web'); - } -}