# Sign In — React Native screen for Expo

One configurable sign-in flow modelled on top mobile apps: Apple / Google / Microsoft / GitHub buttons, phone number + SMS code with a dial-code picker and resend countdown, and email with a password (plus sign-up strength meter and forgot password), a one-time code or a magic link with a 'Check your inbox' screen. Every method is optional; steps slide in direction-aware, respect Reduce Motion, and stay clear of the keyboard. Monochrome by default.

- Docs: https://expokit.in/docs/blocks/sign-in
- Tier: Pro (ExpoKit Pro plan)
- Also called: login screen, sign in page, auth screen, sign up screen
- Category: Blocks
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg, expo-haptics
- Uses ExpoKit items: kit, button, floating-input, password-input, otp-input
- Variants: Default, Phone Otp, Email Password, Magic Link, Otp Step, Sign Up, Custom Accent

## Installation

This screen is part of ExpoKit Pro. With a Pro plan, log the CLI in once and add it like any other item:

```bash
npx @expokit/cli@latest login
```

Plans: https://expokit.in/pricing

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `methods` | `('apple' \| 'google' \| 'microsoft' \| 'github' \| 'phone' \| 'email')[]` | `['apple', 'google', 'phone', 'email']` | Options in display order. OAuth ones render as 'Continue with X'; phone / email open their step. Exactly one of phone / email and no OAuth skips the welcome step. |
| `emailMode` | `'password' \| 'code' \| 'magic-link'` | `'password'` | What follows the email step: a password, a one-time email code, or a magic link + 'Check your inbox'. |
| `mode / defaultMode` | `'sign-in' \| 'sign-up'` | `'sign-in'` | Controlled / initial mode. Sign-up shows 'Create account' and a password strength meter. |
| `onModeChange` | `(mode) => void` | — | The footer 'Sign up' / 'Sign in' link toggled the mode. |
| `initialStep` | `'welcome' \| 'phone' \| 'otp' \| 'email' \| 'password' \| 'email-code' \| 'check-email' \| 'forgot'` | `'welcome'` | Step to open on mount (demos, deep links). Back still walks a sensible stack. |
| `defaultPhone` | `string` | `''` | Prefill the number (digits; a leading dial code is stripped). |
| `defaultEmail` | `string` | `''` | Prefill the email field. |
| `countryCode` | `string` | `'+91'` | Selected dial code. +91 formats as '98765 43210' and needs 10 digits; others accept 7–15. |
| `countries` | `{ code, dial, flag? }[]` | `IN, US, GB, AE, SG, AU` | Dial-code picker list (tap the chip). One entry hides the picker. |
| `otpLength` | `number` | `6` | Digits in the one-time code. |
| `resendSeconds` | `number` | `30` | Countdown before 'Resend code' / 'Resend' is available. |
| `onOAuth` | `(provider) => void \| Promise` | — | OAuth button pressed. Spinner while pending; resolve → onSuccess, throw → message shown inline. |
| `onSendPhoneCode` | `(fullPhone: string) => void \| Promise` | — | Send an SMS code to the E.164 number ('+919876543210'). Resolve to open the code step; also used by Resend. |
| `onVerifyPhoneCode` | `(fullPhone, code) => void \| Promise` | — | Called when the cells fill. Resolve → success state then onSuccess; throw → error on the cells. |
| `onEmailPassword` | `({ email, password, mode }) => void \| Promise` | — | Password step submitted. Resolve → onSuccess; throw → message under the field. |
| `onSendEmailCode` | `(email) => void \| Promise` | — | emailMode 'code': send the code. Resolve to open the code step. |
| `onVerifyEmailCode` | `(email, code) => void \| Promise` | — | emailMode 'code': check the code. Resolve → onSuccess. |
| `onSendMagicLink` | `(email) => void \| Promise` | — | emailMode 'magic-link': send the link. Resolve to show 'Check your inbox'. |
| `onForgotPassword` | `(email) => void \| Promise` | — | 'Send reset link' pressed on the forgot step. Resolve to show 'Check your inbox'. |
| `onSuccess` | `() => void` | — | Called after any successful final step (OAuth, code verified, email + password). |
| `onBack` | `() => void` | — | Shows a back button on the first step. |
| `onTerms / onPrivacy` | `() => void` | — | Make 'Terms' / 'Privacy Policy' in the legal line tappable. |
| `appName` | `string` | `'Northwind'` | Used in the default title and the logo initial. |
| `logo` | `ReactNode` | `monochrome initial mark` | Replace the welcome logo. |
| `title` | `string` | ``Welcome to ${appName}`` | Welcome heading. |
| `subtitle` | `string` | `'Sign in to continue.'` | Line under the welcome heading. |
| `accent` | `string` | `theme accent` | Primary buttons, links and focus rings (black in light, white in dark by default). |
| `style` | `StyleProp<ViewStyle>` | — | Root style. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |
| `error / onDismissError` | `string / () => void` | — | Controlled error shown on the current step; onDismissError fires when the user edits or navigates. |
| `onSignUp` | `() => void` | — | Pressed 'Sign up' — called instead of toggling the mode. |
| `onSubmit / onSocial / providers` | `deprecated` | — | Aliases of onEmailPassword / onOAuth; providers (apple / google) sets the OAuth part of methods when methods isn't given. |

## FAQ

### How do I make a login screen in React Native?

Use ExpoKit's Sign In, a Pro screen: with ExpoKit Pro, the ExpoKit CLI copies a ready-made login screen into your Expo or React Native app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Sign In work in Expo Go?

Yes. Sign In runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg, expo-haptics) are all included in Expo Go.

### How do I add Sign In to my Expo app?

With ExpoKit Pro, add it with the ExpoKit CLI: it copies the screen's source into your app and installs react-native-svg, expo-haptics, so the code is yours to change. The install command is on this page for Pro members.

### Is Sign In free?

Sign In is part of ExpoKit Pro. With a Pro plan, log the CLI in once and it installs the full source into your app.

### Can I change how Sign In looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit screen. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/blocks/sign-in
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
