Search code examples
firebasegoogle-authenticationgoogle-play-servicesexpocreate-react-native-app

Any way to use Firebase google authentication in expo (create-react-native-app) without "eject" project


As the question, for Login with google in firebase need to set google-service but if you create new react-native project with create-react-native-app there will have no "android" or "ios" folder (accept used "eject") so, anyone have a suggestion for me? However I've no idea for how to setting google-service in my project too (even I "eject" the project).


Solution

  • It isn't necessary to make any changes to the android or ios folders in order to support Google sign in with firebase on an app built with Expo.

    1. Follow the guide for configuring Google auth on the Expo docs
    2. Use the approach described in Expo's Using Firebase guide, where it describes how to authenticate with Facebook, and swap out Google where needed.