Skip "Sign in" screen and go directly to phone auth with firebase_ui_auth

56 Views Asked by At

I'm starting out with Firebase UI Auth and it's working . But the way I have it coded I'm forcing my user to click an unnecessary 'Sign in with phone' link to initiate phone auth. I'd like to skip the "Sign in" screen altogether since it's adding an extra step for no value in my case. The stock SignIn class seems to do just what I want otherwise. How would I do this? Thanks!

My current UX

  static final GoRoute _auth = GoRoute(
    path: 'auth',
    builder: (context, state) => Material(
      child: SignInScreen(
        showAuthActionSwitch: false,
        providers: [PhoneAuthProvider()],
      ),
    ),
  );

I gave the docs a quick scan, I didn't delve deeply into the customization options which I'm hoping hold the key to doing what I want without a lot of additional coding

1

There are 1 best solutions below

0
barcolounger On

Doh - it's this simple

  static final GoRoute _auth = GoRoute(
    path: 'auth',
    builder: (context, state) => Material(
      child: PhoneInputScreen(),
    ),
  );