Skip to main content

Deploy an Expo app to production

There are a few caveats to deploying production Expo applications with Clerk. This guide will walk you through the steps to deploy your Expo app to production.

Important

If you're using hosted authentication, native componentsExpo Icon, or native sign-in hooksExpo Icon, you must add your application to the Native applications page in the Clerk Dashboard for your production instance. For iOS, you will need your app's Bundle ID and Team ID. For Android, you will need your app's namespace and package name.

Minimum app versions are set per instance. If you need one, set it in your production instance too. In production, minimum versions require the Pro or Business plan. See Require a minimum app version.

Acquire a domain

Before deploying your Expo app to production, you must acquire a domain. Even though there may not be a web application associated with an Expo app, Clerk still requires a domain for production instances.

Configure your Expo app

With Clerk, you can add OAuth flows in your Expo applications.

Clerk ensures that security critical nonces are passed only to allowlisted URLs when the SSO flow is completed in native browsers or webviews. For maximum security in your production instances, you need to allowlist your custom redirect URLs via the Clerk Dashboard or the Clerk Backend API.

To allowlist a redirect URL via the Clerk Dashboard:

  1. In the Clerk Dashboard, navigate to the Native applications page.
  2. Scroll down to the Allowlist for mobile SSO redirect section and add your redirect URLs.

Note

By default, Clerk uses {bundleIdentifier}://callback as the redirect URL.

Deploy to production

Now that you have acquired a domain and configured your Expo app, you can follow the Clerk deployment guide.

Enable the Native API in production

Ensure the Native API is enabled for your production instance. Otherwise, requests from your production app fail with a native_api_disabled error.

  1. At the top of the Clerk Dashboard, in the instance selection dropdown, ensure that your production instance is selected.
  2. Navigate to the Native applications page and ensure the Native API is enabled.

Warning

Enabling the Native API opens a public request pathway that bypasses browser-based CAPTCHA challenges. Learn more about how the Native API affects challenges.

Feedback

What did you think of this content?

Last updated on