Skip to content

Commit

Permalink
Add note on how to determine allowlist urls for expo (#1693)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Aguilar <[email protected]>
  • Loading branch information
bmorrisondev and alexisintech authored Nov 12, 2024
1 parent f8af7f5 commit e6876cd
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/deployments/deploy-expo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,21 @@ Clerk ensures that security critical nonces will be passed only to allowlisted U

So for maximum security in your production instances, you need to allowlist your custom redirect URLs:

1. Navigate to the [Clerk Dashboard](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections).
1. In the top navigation, select **Configure**. Then in the sidebar, select **SSO Connections**.
1. In the Clerk Dashboard, navigate to the [**SSO Connections**](https://dashboard.clerk.com/last-active?path=user-authentication/sso-connections) page.
1. Scroll to the **Allowlist for mobile OAuth redirect** section and add your redirect URLs.
1. The default is `your-app-scheme://oauth-native-callback`
1. If you'd like to pass a custom redirect url, make sure you add that to the allowlist.
1. The default is `<INSERT-YOUR-APP-SCHEME>://oauth-native-callback`
1. If you'd like to pass a custom redirect URL, make sure you add that to the allowlist. The format is `<INSERT-YOUR-APP-SCHEME>/{PATH}`. For example, the redirect URL for the following code example is `myapp://dashboard`.
```ts
const { startOAuthFlow } = useOAuth({ strategy: `oauth_apple` })

const onPress = React.useCallback(async () => {
const { createdSessionId, setActive } = await startOAuthFlow({
redirectUrl: Linking.createURL('dashboard', { scheme: 'myapp' }),
})

// The rest of your code...
}, [])
```

> [!TIP]
> You can also add redirect URLs via [the Backend API](/docs/reference/backend-api/tag/Redirect-URLs#operation/CreateRedirectURL).
Expand Down

0 comments on commit e6876cd

Please sign in to comment.