As we have understood that popular social networking sites are Google Plus, Facebook, and Twitter, whereas GitHub is more of engineers' and software developers' place. Firebase can work with popular Authentication providers, and it can also support the non-popular authentication providers. We will explore popular authentication providers using the Firebase SDK.
Google authentication will use the instance of the GoogleSigninOptions
class and also it needs a googleApiClient
object. Using a builder pattern, we will construct the following code snippet that will be passed to googleApiClient
later:
GoogleSignInOptions signInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.default_web_client_id)) .requestEmail() .requestProfile() .build();
This fabricates a GoogleSignInOptions
instance by utilizing the default arrangement for a Google...