---
title: "Test sign-up emails and magic links in React Native and Expo · Proxy Mail QA"
description: "Test codes, magic links and deep links in React Native and Expo apps: exp:// and myapp:// links, the simulator, and automating it with Detox, Appium or Maestro."
url: https://proxymail.qa/mobile/react-native-expo
---

1. [Home](https://proxymail.qa/)
2. [Mobile apps](https://proxymail.qa/mobile)

# Testing sign-up emails and magic links in React Native and Expo

In React Native the hard part isn't the email, it's the link: Expo Go, a development build and the store app each open a different kind of link, and the one in the email has to match how the app is running. Here's how to test it by hand and in Detox, Appium or Maestro.

Updated October 18, 2026

## Why sign-up emails are awkward to test in React Native

- **The link depends on how the app is running.** `Linking.createURL('/verify')` gives `exp://192.168.1.5:8081/--/verify` in Expo Go and `myapp://verify` in a development build. Request an email from one and open it in the other, and nothing happens.
- **The redirect has to be allowed.** Supabase, Firebase and most auth providers only redirect to URLs you’ve listed, so each scheme you use needs adding.
- **App links can’t be clicked from a laptop.** A desktop browser doesn’t know what to do with `exp://` or `myapp://`.
- **Links that launch the app are easy to drop.** Handling only the `url` event misses the link that started the app.

## Test it by hand in the simulator or emulator

1. **Create an address** in Proxy Mail QA, with a persona and a generated password if your form needs them.
2. **Sign up in the app** in the iOS simulator or Android emulator. Both share your computer’s clipboard.
3. **Get the code** from the address’s row with **Copy**.
4. **Or open the link in the app.** Copy it and run `npx uri-scheme open '<link>' --ios` (or `--android`), or `xcrun simctl openurl booted '<link>'` and `adb shell "am start -W -a android.intent.action.VIEW -d '<link>'"`. The inbox shows the simulator and emulator commands next to app links.

## Automate it with Detox

The [npm client](https://proxymail.qa/docs/node) works in Detox tests:

JavaScript

```js
import { ProxyMailQA } from 'proxymail-qa';

const qa = new ProxyMailQA(); // reads PROXYMAIL_QA_API_KEY

it('signs up with a working magic link', async () => {
  const { address } = await qa.createAddress();
  await element(by.id('email')).typeText(address);
  const submitted = new Date();
  await element(by.id('send-link')).tap();

  const { value: link } = await qa.waitForLink(address, { type: 'magic_signin', since: submitted, app: true });
  await device.openURL({ url: link });
  await expect(element(by.id('home'))).toBeVisible();
});

```

For a code, `qa.waitForCode(address, { since: submitted })`. To check the email too, `qa.checkEmail(address, { since: submitted, expectHost: 'links.example.com' })` returns what failed, with your app’s link domain as `expectHost`. Appium and Maestro work the same way: see [Detox and Appium](https://proxymail.qa/docs/detox-appium) and [Maestro](https://proxymail.qa/docs/maestro).

## What to check in your React Native code

- **The email input leaves the address alone.** `autoCapitalize="none"`, `autoCorrect={false}`, `keyboardType="email-address"` and `autoComplete="email"`.
- **The code input offers AutoFill on iOS.** `textContentType="oneTimeCode"`.
- **Cold-start links are handled.** With plain React Native, read `Linking.getInitialURL()` at startup as well as listening for `url` events. Expo Router and React Navigation’s `linking` config do both for you.
- **Each build sends the right link.** Build the redirect from the running app (`Linking.createURL`) only where that’s what you want, and add each scheme to your auth provider’s allowed redirect URLs.
- **The link is still single-use.** Open it twice: the second time should explain that it was used.
- **Links don’t point at your computer.** An `exp://` link carries your dev server’s address, so it only opens on a device that can reach that server. Web links to `localhost` are flagged: see [links that point at localhost](https://proxymail.qa/solve/localhost-links).

Using Firebase email-link sign-in through React Native Firebase? See [Firebase email-link sign-in on mobile](https://proxymail.qa/mobile/firebase-email-link) for the native setup it needs.

## Try it on your next sign-up test

Free plan, no credit card. Create an address and watch the code or link arrive.

[Create a free account](https://app.proxymail.qa/?mode=signup)

## Questions

### Why does my magic link start with exp://?

Expo's Linking.createURL builds the link for how the app is running right now: exp://<your computer's address>:8081/--/path in Expo Go, and yourscheme://path in a development or store build. If you pass it as the redirect when requesting the email, the email carries the same kind of link. That's fine while developing in Expo Go, but a staging or store build must send its own scheme or an https link.

### Does Proxy Mail QA find exp:// and myapp:// links?

Yes. Links with the app's own scheme are picked out of the email and classified like web links, so waiting for a verify or magic link returns them. When an email has both a web link and an app link, ask for the app one with app=true. The inbox shows app links as copy-only, with the simulator and emulator commands next to them.

### Can I use the npm package in Detox?

Yes. Detox tests run in Node, so npm install --save-dev proxymail-qa and import it in your test files. It needs Node 18 or later. Keep the API key in the test run's environment, never in the app's config.

### My Supabase magic link opens the app but nobody is signed in. Why?

Opening the app isn't enough: your link handler has to read the tokens or the code from the URL and create the session (with PKCE, exchangeCodeForSession). Check the handler runs for a link that launches the app, not only one that arrives while it's open.

## Related guides

- [Test sign-up emails in a SwiftUI or UIKit appCodes and Universal Links in the iOS simulator, by hand or in XCUITest, and the cold-start link bug to check for.](https://proxymail.qa/mobile/ios-sign-up-testing)
- [Test sign-up emails in an Android app (Kotlin)Codes and App Links on the emulator, by hand or in Espresso, and why a link opens Chrome instead of your app.](https://proxymail.qa/mobile/android-sign-up-testing)
- [Test sign-up emails in a Flutter appCodes in integration tests, deep links on both platforms, and Supabase or Firebase redirects that open the app.](https://proxymail.qa/mobile/flutter)
- [Test Firebase email-link sign-in on iOS and AndroidThe setup after Dynamic Links shut down, and how to test the link opening the app on the same and another device.](https://proxymail.qa/mobile/firebase-email-link)

[See every email testing problem we solve](https://proxymail.qa/solve)
