use login with google i firebase code example
Example: how to enable sign-in provider in firebase console
Enable Google Sign-In in the Firebase console:
1. In the Firebase console, open the Auth section.
2. On the Sign in method tab, enable the Google sign-in method and click Save.