Let's explain what just happened in the preceding code:
- We added the new button for the Google authentication. Within the tap event of this button, we gave it the googleLogin() function.
- Within googleLogin(), we used the Firebase login button giving it firebase.LoginType.GOOGLE as type. Notice that, similar to normal Google authentication on a web platform, we can also give the hd or the hostedDomain option. We could also use the option of filtering the connection hosting we want by adding the following option under the login type:
googleOptions: { hostedDomain: "<your-host-name>" }
The hd option or the hostedDomain is simply what's after the @ sign in an email address. So, for example, in ...