diff --git a/.changeset/config.json b/.changeset/config.json index 5409012..3107f0d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -21,8 +21,6 @@ "react-sizes", "react-b2b-demo", "other-framework-demo", - "react-native-demo", - "react-native-b2b-demo", "e2e-tests", "clientside-services" diff --git a/.cursor/rules/project-overview.mdc b/.cursor/rules/project-overview.mdc index 2d84491..6f66594 100644 --- a/.cursor/rules/project-overview.mdc +++ b/.cursor/rules/project-overview.mdc @@ -19,13 +19,12 @@ This is a monorepo for Stytch JavaScript SDKs. The codebase is split between B2C - `@stytch/vanilla-js` - Framework-agnostic bindings using custom elements. Re-exports from `@stytch/web`. - `@stytch/react` - React-specific bindings (client-side only). Re-exports from `@stytch/web` and adds React Context/hooks. - `@stytch/nextjs` - Next.js bindings with SSR support. Re-exports from `@stytch/web`. -- `@stytch/react-native` - Standalone SDK for React Native with native Kotlin/Swift/Objective-C code. Shares some copied code with web, but code reuse should be done primarily by lifting them to `@stytch/core` **Helper Packages:** - `@stytch/core` - Business logic, session management, PKCE, Subscription Service. Exports: - `@stytch/core/public` - Public API (types, constants) - - `@stytch/core` - Internal implementation consumed by web and react-native + - `@stytch/core` - Internal implementation consumed by web - Defines the `StytchClient` template with platform-agnostic logic - `@stytch/js-utils` - Utility functions bundled into other packages (not published) @@ -62,7 +61,6 @@ packages/ # Published and internal packages vanilla-js/ # Framework-agnostic SDK react/ # React bindings nextjs/ # Next.js bindings - react-native/ # React Native SDK core/ # Business logic and session management js-utils/ # Utility functions (bundled, not published) apps/ # Demo applications @@ -70,7 +68,6 @@ apps/ # Demo applications react-b2b-demo/ next-demo/ passkey-demo/ - react-native-demo/ other-framework-demo/ services/ clientside-services/ # Static files loaded from Stytch servers diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 4a8cc32..7e68801 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -17,13 +17,12 @@ This is a monorepo for Stytch JavaScript SDKs. The codebase is split between B2C - `@stytch/vanilla-js` - Framework-agnostic bindings using custom elements. Re-exports from `@stytch/web`. - `@stytch/react` - React-specific bindings (client-side only). Re-exports from `@stytch/web` and adds React Context/hooks. - `@stytch/nextjs` - Next.js bindings with SSR support. Re-exports from `@stytch/web`. -- `@stytch/react-native` - Standalone SDK for React Native with native Kotlin/Swift/Objective-C code. Shares some copied code with web, but code reuse should be done primarily by lifting them to `@stytch/core` **Helper Packages:** - `@stytch/core` - Business logic, session management, PKCE, Subscription Service. Exports: - `@stytch/core/public` - Public API (types, constants) - - `@stytch/core` - Internal implementation consumed by web and react-native + - `@stytch/core` - Internal implementation consumed by web - Defines the `StytchClient` template with platform-agnostic logic - `@stytch/js-utils` - Utility functions bundled into other packages (not published) @@ -60,7 +59,6 @@ packages/ # Published and internal packages vanilla-js/ # Framework-agnostic SDK react/ # React bindings nextjs/ # Next.js bindings - react-native/ # React Native SDK core/ # Business logic and session management js-utils/ # Utility functions (bundled, not published) apps/ # Demo applications @@ -68,7 +66,6 @@ apps/ # Demo applications react-b2b-demo/ next-demo/ passkey-demo/ - react-native-demo/ other-framework-demo/ services/ clientside-services/ # Static files loaded from Stytch servers diff --git a/.yarn/patches/react-native-country-codes-picker-npm-2.3.5-3de615b7fb.patch b/.yarn/patches/react-native-country-codes-picker-npm-2.3.5-3de615b7fb.patch deleted file mode 100644 index 34ce39d..0000000 --- a/.yarn/patches/react-native-country-codes-picker-npm-2.3.5-3de615b7fb.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/index.tsx b/index.tsx -index 6464ae12194d6ed49d2e1a3fe201490178c49cb2..0cbbed8deb27e7ca50d7d7c4466c40841a65d0f1 100644 ---- a/index.tsx -+++ b/index.tsx -@@ -1,4 +1,4 @@ --import React from 'react'; -+import React, { JSX } from 'react'; - import { - FlatList, - TextInput, diff --git a/CLAUDE.md b/CLAUDE.md index bd4375d..5ca4897 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,13 +17,12 @@ This is a monorepo for Stytch JavaScript SDKs. The codebase is split between B2C - `@stytch/vanilla-js` - Framework-agnostic bindings using custom elements. Re-exports from `@stytch/web`. - `@stytch/react` - React-specific bindings (client-side only). Re-exports from `@stytch/web` and adds React Context/hooks. - `@stytch/nextjs` - Next.js bindings with SSR support. Re-exports from `@stytch/web`. -- `@stytch/react-native` - Standalone SDK for React Native with native Kotlin/Swift/Objective-C code. Shares some copied code with web, but code reuse should be done primarily by lifting them to `@stytch/core` **Helper Packages:** - `@stytch/core` - Business logic, session management, PKCE, Subscription Service. Exports: - `@stytch/core/public` - Public API (types, constants) - - `@stytch/core` - Internal implementation consumed by web and react-native + - `@stytch/core` - Internal implementation consumed by web - Defines the `StytchClient` template with platform-agnostic logic - `@stytch/js-utils` - Utility functions bundled into other packages (not published) @@ -60,7 +59,6 @@ packages/ # Published and internal packages vanilla-js/ # Framework-agnostic SDK react/ # React bindings nextjs/ # Next.js bindings - react-native/ # React Native SDK core/ # Business logic and session management js-utils/ # Utility functions (bundled, not published) apps/ # Demo applications @@ -68,7 +66,6 @@ apps/ # Demo applications react-b2b-demo/ next-demo/ passkey-demo/ - react-native-demo/ other-framework-demo/ services/ clientside-services/ # Static files loaded from Stytch servers diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 3ffa7a3..9c4b6b3 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -215,7 +215,6 @@ Our SDK packages are published to npm and are consumed by external developers (i - [`vanilla-js`](./packages/vanilla-js): an SDK for frontend JavaScript projects. It includes a stateful headless client that integrates with browser features (such as cookies and local storage). It also includes prebuilt UI built using Preact and a framework-agnostic interface for integrating with arbitrary frontend frameworks. - [`react`](./packages/react): React-specific bindings for `vanilla-js`. This package only supports client-side rendering. - [`nextjs`](./packages/nextjs): Next.js specific bindings for `vanilla-js`. This package is compatible with server-side rendering, including React-based, non-Next.js frameworks. -- [`react-native`](./packages/react-native): an SDK for React Native projects. It includes a stateful headless client and prebuilt UI. ### Helper packages @@ -223,7 +222,7 @@ We use some helper packages to better organize code. Some of these packages are - [`core`](./packages/core): a package containing constants, types, and most of the business logic around our different product offerings (EML, OTP, etc) as well as the logic for managing sessions (token refresh, etc), PKCE, and the Subscription Service which coordinates - sharing User and Session data across services. This package is consumed directly by `vanilla-js` and `react-native`. + sharing User and Session data across services. This package is consumed directly by `vanilla-js`. It declares a template for the `StytchClient` (the main export of Stytch SDKs), and includes all the logic that is SDK target agnostic. The components that are specific to individual SDKs @@ -231,7 +230,7 @@ We use some helper packages to better organize code. Some of these packages are by individual SDK packages and used to create and export a `StytchClient` object, which is the export to be used by external developers leveraging Stytch SDKs for their own projects. - This package is published to npm as a dependency of other packages (including `vanilla-js` and `react-native`), but it is not intended to be used directly by external developers. + This package is published to npm as a dependency of other packages (including `vanilla-js`), but it is not intended to be used directly by external developers. - [`js-utils`](./packages/js-utils): a package containing utility functions used by other packages, including `vanilla-js`, `react`, and `nextjs`. This package is not published to npm; its contents are bundled into other packages as part of the build process. diff --git a/README.md b/README.md index 9310b77..aab63ad 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ This monorepo contains the following published npm packages: - **[@stytch/vanilla-js](https://www.npmjs.com/package/@stytch/vanilla-js)** - Core JavaScript SDK for frontend projects - **[@stytch/react](https://www.npmjs.com/package/@stytch/react)** - React-specific bindings for the JavaScript SDK - **[@stytch/nextjs](https://www.npmjs.com/package/@stytch/nextjs)** - Next.js specific bindings with SSR support -- **[@stytch/react-native](https://www.npmjs.com/package/@stytch/react-native)** - React Native SDK ### Installation diff --git a/ai/rules/project-overview.md b/ai/rules/project-overview.md index 2d84491..6f66594 100644 --- a/ai/rules/project-overview.md +++ b/ai/rules/project-overview.md @@ -19,13 +19,12 @@ This is a monorepo for Stytch JavaScript SDKs. The codebase is split between B2C - `@stytch/vanilla-js` - Framework-agnostic bindings using custom elements. Re-exports from `@stytch/web`. - `@stytch/react` - React-specific bindings (client-side only). Re-exports from `@stytch/web` and adds React Context/hooks. - `@stytch/nextjs` - Next.js bindings with SSR support. Re-exports from `@stytch/web`. -- `@stytch/react-native` - Standalone SDK for React Native with native Kotlin/Swift/Objective-C code. Shares some copied code with web, but code reuse should be done primarily by lifting them to `@stytch/core` **Helper Packages:** - `@stytch/core` - Business logic, session management, PKCE, Subscription Service. Exports: - `@stytch/core/public` - Public API (types, constants) - - `@stytch/core` - Internal implementation consumed by web and react-native + - `@stytch/core` - Internal implementation consumed by web - Defines the `StytchClient` template with platform-agnostic logic - `@stytch/js-utils` - Utility functions bundled into other packages (not published) @@ -62,7 +61,6 @@ packages/ # Published and internal packages vanilla-js/ # Framework-agnostic SDK react/ # React bindings nextjs/ # Next.js bindings - react-native/ # React Native SDK core/ # Business logic and session management js-utils/ # Utility functions (bundled, not published) apps/ # Demo applications @@ -70,7 +68,6 @@ apps/ # Demo applications react-b2b-demo/ next-demo/ passkey-demo/ - react-native-demo/ other-framework-demo/ services/ clientside-services/ # Static files loaded from Stytch servers diff --git a/apps/react-native-b2b-demo/.envrc.template b/apps/react-native-b2b-demo/.envrc.template deleted file mode 100644 index 6c05dd6..0000000 --- a/apps/react-native-b2b-demo/.envrc.template +++ /dev/null @@ -1,10 +0,0 @@ -# Copy this from your Stytch Dashboard -export STYTCH_PUBLIC_TOKEN=public-token-... -# Replace with the name you use in remote dev -export STYTCH_ORG_ID=organization-test-... -export STYTCH_OAUTH_URL=something://auth -export STYTCH_TEST_API_URL=https://test.${name}.stytch.com -export STYTCH_LIVE_API_URL=https://api.${name}.stytch.com -export STYTCH_DFP_BACKEND_URL=https://telemetry.stytch.com -export STYTCH_WEBAUTHN_DOMAIN=stytch.com -export STYTCH_SAML_CONNECTION_ID=saml-connection-... diff --git a/apps/react-native-b2b-demo/.gitignore b/apps/react-native-b2b-demo/.gitignore deleted file mode 100644 index a91204e..0000000 --- a/apps/react-native-b2b-demo/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -node_modules/ -.expo/ -dist/ -npm-debug.* -*.jks -*.p8 -*.p12 -*.key -*.mobileprovision -*.orig.* -web-build/ - -# macOS -.DS_Store - -# Temporary files created by Metro to check the health of the file watcher -.metro-health-check* - -.envrc diff --git a/apps/react-native-b2b-demo/App.tsx b/apps/react-native-b2b-demo/App.tsx deleted file mode 100644 index 78ded41..0000000 --- a/apps/react-native-b2b-demo/App.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { NavigationContainer } from '@react-navigation/native'; -import { createNativeStackNavigator } from '@react-navigation/native-stack'; -import { StytchB2BClient, StytchB2BProvider } from '@stytch/react-native/b2b'; -import Constants from 'expo-constants'; -import * as React from 'react'; - -import { - AuthenticatedScreen, - AuthenticateScreen, - DiscoveryScreen, - OAuthScreen, - PasswordScreen, - SessionScreen, - SSOScreen, - StytchB2BUIComponent, - WelcomeScreen, -} from './pages'; -import { B2BUIFlowType } from './pages/StytchB2BUIComponent'; - -export type RootStackParamList = { - Welcome: undefined; - Passwords: undefined; - Discovery: { intermediate_session_token: string | undefined }; - Authenticate: { stytch_token_type: string; token: string }; - Authenticated: undefined; - Session: undefined; - SSO: undefined; - OAuth: undefined; - StytchB2BUIComponent: { type: B2BUIFlowType }; -}; - -const Stack = createNativeStackNavigator(); - -function App() { - const publicToken = Constants?.expoConfig?.extra?.stytchPublicToken; - const stytch = new StytchB2BClient(publicToken); - - return ( - -