Skip to content

AuthView 'Use phone number' toggle does not switch identifier field when embedded via Expo native #8659

@Blakefolgado

Description

@Blakefolgado

Summary

In Clerk iOS AuthView, tapping Use phone number can appear to do nothing when the view is embedded through the Expo native bridge / React Native host. The tap is received, but the identifier input stays on the email/username field instead of switching to the phone-number field.

Environment

  • clerk-ios: 1.1.1
  • @clerk/expo: 3.2.7
  • Expo SDK: 55
  • React Native: 0.83.6
  • iOS native AuthView rendered via @clerk/expo/native
  • AuthView usage: mode="signIn", isDismissable={false}
  • Clerk instance has phone number and email sign-in enabled, so the switcher is shown

Steps to reproduce

  1. Configure a Clerk instance with both email and phone-number sign-in enabled.
  2. Render native iOS AuthView from @clerk/expo/native.
  3. On the initial identifier screen, tap Use phone number.

Expected behavior

The identifier field switches from email/username to phone-number entry.

Actual behavior

The button press does not visibly change the field. The user remains on the email/username identifier field.

Source-level finding

In Sources/ClerkKitUI/Components/Auth/AuthStartView.swift, the active identifier mode is stored as scene storage:

@SceneStorage("phoneNumberFieldIsActive") private var phoneNumberFieldIsActive = false

Changing this local UI toggle state to @State makes the phone-number switch work reliably in the Expo native embedded AuthView:

@State private var phoneNumberFieldIsActive = false

That state appears to be purely local to the current auth-start view, so scene persistence may be unnecessary and can break in embedded/native-host contexts where SwiftUI scene storage is not behaving like a normal app scene.

Notes

This does not appear to be a Clerk Dashboard strategy/configuration issue: the phone strategy is enabled, the switcher renders, and phone OTP APIs are available. The failure is the SwiftUI field-mode toggle not updating the rendered identifier field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions