Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/_partials/billing/add-new-payment-method.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ The following example demonstrates how to create a billing page where a user can
<If sdk="react">
<CodeBlockTabs options={["<UserBillingPage />", "<AddPaymentMethodForm />"]}>
```tsx {{ filename: 'src/pages/user/billing/page.tsx' }}
import { ClerkLoaded } from '@clerk/clerk-react'
import { PaymentElementProvider } from '@clerk/clerk-react/experimental'
import { ClerkLoaded } from '@clerk/react'
import { PaymentElementProvider } from '@clerk/react/experimental'
import { AddPaymentMethodForm } from './AddPaymentMethodForm'

export default function Page() {
Expand All @@ -107,8 +107,8 @@ The following example demonstrates how to create a billing page where a user can
```

```tsx {{ filename: 'src/pages/user/billing/AddPaymentMethodForm.tsx', collapsible: true }}
import { useUser } from '@clerk/clerk-react'
import { usePaymentElement, PaymentElement } from '@clerk/clerk-react/experimental'
import { useUser } from '@clerk/react'
import { usePaymentElement, PaymentElement } from '@clerk/react/experimental'
import { useState } from 'react'

export function AddPaymentMethodForm() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

<If sdk="react">
```tsx {{ filename: 'src/pages/premium-content.tsx' }}
import { useAuth } from '@clerk/clerk-react'
import { useAuth } from '@clerk/react'

export default function PremiumContentPage() {
const { isLoaded, has } = useAuth()
Expand Down Expand Up @@ -214,7 +214,7 @@

<If sdk="expo">
```tsx {{ filename: 'app/(home)/premium-content.tsx' }}
import { useAuth } from '@clerk/clerk-expo'
import { useAuth } from '@clerk/expo'
import { Text } from 'react-native'

export default function PremiumContentPage() {
Expand Down
4 changes: 2 additions & 2 deletions docs/_partials/billing/checking-feature-using-protect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

<If sdk="react">
```tsx {{ filename: 'src/pages/protected-premium-content.tsx' }}
import { Protect } from '@clerk/clerk-react'
import { Protect } from '@clerk/react'

export default function ProtectedPremiumContentPage() {
return (
Expand Down Expand Up @@ -166,7 +166,7 @@

<If sdk="expo">
```tsx {{ filename: 'app/(home)/protected-premium-content.tsx' }}
import { Protect } from '@clerk/clerk-expo'
import { Protect } from '@clerk/expo'
import { Text, View } from 'react-native'

export default function ProtectedPremiumContentPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

<If sdk="react">
```tsx {{ filename: 'src/pages/manage-premium-content.tsx' }}
import { useAuth } from '@clerk/clerk-react'
import { useAuth } from '@clerk/react'

export default function ManagePremiumContentPage() {
const { has, isLoaded } = useAuth()
Expand Down Expand Up @@ -236,7 +236,7 @@

<If sdk="expo">
```tsx {{ filename: 'app/(home)/manage-premium-content.tsx' }}
import { useAuth } from '@clerk/clerk-expo'
import { useAuth } from '@clerk/expo'
import { Text } from 'react-native'

export default function ManagePremiumContentPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

<If sdk="react">
```tsx {{ filename: 'src/pages/protected-manage-content.tsx' }}
import { Protect } from '@clerk/clerk-react'
import { Protect } from '@clerk/react'

export default function ProtectedManageContentPage() {
return (
Expand Down Expand Up @@ -178,7 +178,7 @@

<If sdk="expo">
```tsx {{ filename: 'app/(home)/protected-manage-content.tsx' }}
import { Protect } from '@clerk/clerk-expo'
import { Protect } from '@clerk/expo'
import { Text, View } from 'react-native'

export default function ProtectedManageContentPage() {
Expand Down
4 changes: 2 additions & 2 deletions docs/_partials/billing/checking-plan-using-has-function.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

<If sdk="react">
```tsx {{ filename: 'src/pages/bronze-content.tsx' }}
import { useAuth } from '@clerk/clerk-react'
import { useAuth } from '@clerk/react'

export default function BronzeContentPage() {
const { has, isLoaded } = useAuth()
Expand Down Expand Up @@ -206,7 +206,7 @@

<If sdk="expo">
```tsx {{ filename: 'app/(home)/bronze-content.tsx' }}
import { useAuth } from '@clerk/clerk-expo'
import { useAuth } from '@clerk/expo'
import { Text } from 'react-native'

export default function BronzeContentPage() {
Expand Down
4 changes: 2 additions & 2 deletions docs/_partials/billing/checking-plan-using-protect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<If sdk="react">
```tsx {{ filename: 'src/pages/protected-content.tsx' }}
import { Protect } from '@clerk/clerk-react'
import { Protect } from '@clerk/react'

export default function ProtectedContentPage() {
return (
Expand Down Expand Up @@ -160,7 +160,7 @@

<If sdk="expo">
```tsx {{ filename: 'app/(home)/protected-content.tsx' }}
import { Protect } from '@clerk/clerk-expo'
import { Protect } from '@clerk/expo'
import { Text } from 'react-native'

export default function ProtectedContentPage() {
Expand Down
4 changes: 2 additions & 2 deletions docs/_partials/billing/create-a-pricing-table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

<If sdk="react">
```tsx {{ filename: 'src/screens/pricing.tsx' }}
import { PricingTable } from '@clerk/clerk-react'
import { PricingTable } from '@clerk/react'

export default function PricingScreen() {
return (
Expand Down Expand Up @@ -146,7 +146,7 @@
> Expo only supports the `<PricingTable />` component on the **web**.

```tsx {{ filename: 'app/(home)/pricing.tsx' }}
import { PricingTable } from '@clerk/clerk-expo/web'
import { PricingTable } from '@clerk/expo/web'
import { View } from 'react-native'

export default function PricingPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

<If sdk="react">
```tsx {{ filename: 'src/screens/pricing.tsx' }}
import { PricingTable } from '@clerk/clerk-react'
import { PricingTable } from '@clerk/react'

export default function PricingScreen() {
return (
Expand Down Expand Up @@ -146,7 +146,7 @@
> Expo only supports the `<PricingTable />` component on the **web**.

```tsx {{ filename: 'app/(home)/pricing.tsx' }}
import { PricingTable } from '@clerk/clerk-expo/web'
import { PricingTable } from '@clerk/expo/web'
import { View } from 'react-native'

export default function PricingPage() {
Expand Down
2 changes: 1 addition & 1 deletion docs/_partials/control-components-with-clerkdegraded.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<If sdk="react">
```tsx {{ filename: 'src/App.tsx' }}
import { ClerkLoaded, ClerkLoading, ClerkDegraded, ClerkFailed } from '@clerk/clerk-react'
import { ClerkLoaded, ClerkLoading, ClerkDegraded, ClerkFailed } from '@clerk/react'

export default function App() {
return (
Expand Down
2 changes: 1 addition & 1 deletion docs/_partials/expo/sign-out-custom-flow.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```tsx {{ filename: 'app/components/SignOutButton.tsx', collapsible: true }}
import { useClerk } from '@clerk/clerk-expo'
import { useClerk } from '@clerk/expo'
import { useRouter } from 'expo-router'
import { Text, TouchableOpacity } from 'react-native'

Expand Down
2 changes: 1 addition & 1 deletion docs/_partials/expo/use-sign-in-with-apple-example.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The following example demonstrates how to use the [`useSignInWithApple()`](/docs/reference/expo/use-sign-in-with-apple) hook to manage the Apple authentication flow. Because the `useSignInWithApple()` hook automatically manages the [transfer flow](!transfer-flow) between sign-up and sign-in, you can use this component for both your sign-up and sign-in pages.

```tsx {{ filename: 'components/AppleSignInButton.tsx', collapsible: true }}
import { useSignInWithApple } from '@clerk/clerk-expo'
import { useSignInWithApple } from '@clerk/expo'
import { useRouter } from 'expo-router'
import { Alert, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native'

Expand Down
7 changes: 6 additions & 1 deletion docs/_partials/reverification-callout.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
> [!WARNING]
>
> Depending on the SDK you're using, this feature requires `@clerk/[email protected]` or later, `@clerk/[email protected]` or later, `@clerk/[email protected]` or later and `@clerk/[email protected]` or later.
> This feature requires one of the following SDKS:
>
> - `@clerk/[email protected]` or later
> - `@clerk/react`, or `@clerk/[email protected]` or later
> - `@clerk/[email protected]` or later
> - `@clerk/[email protected]` or later
18 changes: 9 additions & 9 deletions docs/getting-started/quickstart.expo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ sdk: expo
npm run dev
```

## Install `@clerk/clerk-expo`
## Install `@clerk/expo`

The [Clerk Expo SDK](/docs/reference/expo/overview) gives you access to prebuilt components, hooks, and helpers to make user authentication easier.

Run the following command to install the SDK:

```npm
npm install @clerk/clerk-expo
npm install @clerk/expo
```

## Set your Clerk API keys
Expand Down Expand Up @@ -71,7 +71,7 @@ sdk: expo
Add the component to your root layout as shown in the following example:

```tsx {{ filename: 'app/_layout.tsx', mark: [1, 6, 8] }}
import { ClerkProvider } from '@clerk/clerk-expo'
import { ClerkProvider } from '@clerk/expo'
import { Slot } from 'expo-router'

export default function RootLayout() {
Expand All @@ -97,8 +97,8 @@ sdk: expo

1. Update your root layout to use the secure token cache:
```tsx {{ filename: 'app/_layout.tsx', mark: [2, 7] }}
import { ClerkProvider } from '@clerk/clerk-expo'
import { tokenCache } from '@clerk/clerk-expo/token-cache'
import { ClerkProvider } from '@clerk/expo'
import { tokenCache } from '@clerk/expo/token-cache'
import { Slot } from 'expo-router'

export default function RootLayout() {
Expand Down Expand Up @@ -126,7 +126,7 @@ sdk: expo

```tsx {{ filename: 'app/(auth)/_layout.tsx' }}
import { Redirect, Stack } from 'expo-router'
import { useAuth } from '@clerk/clerk-expo'
import { useAuth } from '@clerk/expo'

export default function AuthRoutesLayout() {
const { isSignedIn } = useAuth()
Expand All @@ -146,7 +146,7 @@ sdk: expo
```tsx {{ filename: 'app/(auth)/sign-up.tsx', collapsible: true }}
import * as React from 'react'
import { Text, TextInput, TouchableOpacity, View } from 'react-native'
import { useSignUp } from '@clerk/clerk-expo'
import { useSignUp } from '@clerk/expo'
import { Link, useRouter } from 'expo-router'

export default function SignUpScreen() {
Expand Down Expand Up @@ -263,7 +263,7 @@ sdk: expo
In the `(auth)` group, create a `sign-in.tsx` file with the following code. The [`useSignIn()`](/docs/reference/hooks/use-sign-in) hook is used to create a sign-in flow. The user can sign in using email address and password, or navigate to the sign-up page.

```tsx {{ filename: 'app/(auth)/sign-in.tsx', collapsible: true }}
import { useSignIn } from '@clerk/clerk-expo'
import { useSignIn } from '@clerk/expo'
import { Link, useRouter } from 'expo-router'
import { Text, TextInput, TouchableOpacity, View } from 'react-native'
import React from 'react'
Expand Down Expand Up @@ -365,7 +365,7 @@ sdk: expo
Then, in the same folder, create an `index.tsx` file with the following code. If the user is signed in, it displays their email and a sign-out button. If they're not signed in, it displays sign-in and sign-up links.

```tsx {{ filename: 'app/(home)/index.tsx' }}
import { SignedIn, SignedOut, useUser } from '@clerk/clerk-expo'
import { SignedIn, SignedOut, useUser } from '@clerk/expo'
import { Link } from 'expo-router'
import { Text, View } from 'react-native'
import { SignOutButton } from '@/app/components/SignOutButton'
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/quickstart.react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ This tutorial will demonstrate how to create a new React app using Vite and add
npm run dev
```

## Install `@clerk/clerk-react`
## Install `@clerk/react`

The [Clerk React SDK](/docs/reference/react/overview) gives you access to prebuilt components, hooks, and helpers to make user authentication easier.

Run the following command to install the SDK:

```npm
npm install @clerk/clerk-react
npm install @clerk/react
```

## Set your Clerk API keys
Expand Down Expand Up @@ -83,7 +83,7 @@ This tutorial will demonstrate how to create a new React app using Vite and add
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import { ClerkProvider } from '@clerk/clerk-react'
import { ClerkProvider } from '@clerk/react'

// Import your Publishable Key
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
Expand Down Expand Up @@ -112,7 +112,7 @@ This tutorial will demonstrate how to create a new React app using Vite and add

```tsx {{ filename: 'src/App.tsx', mark: [2, [7, 14]] }}
import './App.css'
import { SignedIn, SignedOut, SignInButton, UserButton } from '@clerk/clerk-react'
import { SignedIn, SignedOut, SignInButton, UserButton } from '@clerk/react'

function App() {
return (
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/development/access-clerk-outside-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The [`Clerk`](/docs/reference/javascript/clerk) object is accessible using the [
<Tabs items={["Fetch", "Axios"]}>
<Tab>
```ts
import { getClerkInstance } from '@clerk/clerk-expo'
import { getClerkInstance } from '@clerk/expo'

export async function fetchFoo() {
const clerkInstance = getClerkInstance()
Expand Down Expand Up @@ -37,7 +37,7 @@ The [`Clerk`](/docs/reference/javascript/clerk) object is accessible using the [
<Tab>
```ts
import axios from 'axios'
import { getClerkInstance } from '@clerk/clerk-expo'
import { getClerkInstance } from '@clerk/expo'

export async function fetchFoo() {
try {
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/development/clerk-environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The following environment variables enable you to configure API and SDK behavior
<Tab>
| Variable | Description |
| - | - |
| `CLERK_JS_URL` | Sets the URL that `@clerk/clerk-react` should hot-load `@clerk/clerk-js` from. `CLERK_JS` does the same but is deprecated. |
| `CLERK_JS_URL` | Sets the URL that `@clerk/react` should hot-load `@clerk/clerk-js` from. `CLERK_JS` does the same but is deprecated. |
| `CLERK_JS_VERSION` | Sets the npm version for `@clerk/clerk-js`. |
| `CLERK_API_URL` | Sets the Clerk API URL for debugging. Defaults to `"https://api.clerk.com"` |
| `CLERK_API_VERSION` | Sets the version of the Clerk API to use. Defaults to `"v1"` |
Expand All @@ -63,7 +63,7 @@ The following environment variables enable you to configure API and SDK behavior
<Tab>
| Variable | Description |
| - | - |
| `NEXT_PUBLIC_CLERK_JS_URL` | Sets the URL that `@clerk/clerk-react` should hot-load `@clerk/clerk-js` from. `NEXT_PUBLIC_CLERK_JS` does the same but is deprecated. |
| `NEXT_PUBLIC_CLERK_JS_URL` | Sets the URL that `@clerk/react` should hot-load `@clerk/clerk-js` from. `NEXT_PUBLIC_CLERK_JS` does the same but is deprecated. |
| `NEXT_PUBLIC_CLERK_JS_VERSION` | Sets the npm version for `@clerk/clerk-js`. |
| `NEXT_PUBLIC_CLERK_API_URL` | Sets the Clerk API URL for debugging. Defaults to `"https://api.clerk.com"` |
| `NEXT_PUBLIC_CLERK_API_VERSION` | Sets the version of the Clerk API to use. Defaults to `"v1"` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ One of the options that Clerk supports for MFA is **Authenticator applications (

```tsx {{ filename: 'app/(dashboard)/_layout.tsx' }}
import { Redirect, Stack } from 'expo-router'
import { useAuth } from '@clerk/clerk-expo'
import { useAuth } from '@clerk/expo'

export default function AuthenticatedLayout() {
const { isSignedIn } = useAuth()
Expand All @@ -361,7 +361,7 @@ One of the options that Clerk supports for MFA is **Authenticator applications (

```tsx {{ filename: 'app/(dashboard)/account.tsx', collapsible: true }}
import React from 'react'
import { useUser } from '@clerk/clerk-expo'
import { useUser } from '@clerk/expo'
import { useRouter } from 'expo-router'
import { View, Text, Button, FlatList } from 'react-native'
import { BackupCodeResource } from '@clerk/types'
Expand Down Expand Up @@ -452,7 +452,7 @@ One of the options that Clerk supports for MFA is **Authenticator applications (

```tsx {{ filename: 'app/(dashboard)/add-mfa.tsx', collapsible: true }}
import React from 'react'
import { useUser } from '@clerk/clerk-expo'
import { useUser } from '@clerk/expo'
import { Link } from 'expo-router'
import { QrCodeSvg } from 'react-native-qr-svg'
import { FlatList, Button, Text, TextInput, View } from 'react-native'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ This guide will walk you through how to build a custom flow that handles user im

```tsx {{ filename: 'app/dashboard/_layout.tsx' }}
import { Redirect, Stack } from 'expo-router'
import { Protect, useAuth } from '@clerk/clerk-expo'
import { Protect, useAuth } from '@clerk/expo'
import { Text } from 'react-native'

export default function GuestLayout() {
Expand Down Expand Up @@ -331,7 +331,7 @@ This guide will walk you through how to build a custom flow that handles user im
import React, { useState } from 'react'
import { Button, Text, View } from 'react-native'
import { useRouter } from 'expo-router'
import { useUser, useSignIn } from '@clerk/clerk-expo'
import { useUser, useSignIn } from '@clerk/expo'
import useUsers from '../hooks/useUsers'

export default function Dashboard() {
Expand Down
Loading