Class GenericIdpSignInHandler

    • Constructor Detail

      • GenericIdpSignInHandler

        public GenericIdpSignInHandler​(Application application)
    • Method Detail

      • getGenericGoogleConfig

        @NonNull
        public static AuthUI.IdpConfig getGenericGoogleConfig()
      • getGenericFacebookConfig

        @NonNull
        public static AuthUI.IdpConfig getGenericFacebookConfig()
      • startSignIn

        public void startSignIn​(@NonNull
                                com.google.firebase.auth.FirebaseAuth auth,
                                @NonNull
                                HelperActivityBase activity,
                                @NonNull
                                String providerId)
        Description copied from class: ProviderSignInBase
        Start the login process for the IDP using the web based Generic IDP flow if applicable, e.g. sign-in through a custom-chrome tab, otherwise falls back to the default method.
        Specified by:
        startSignIn in class ProviderSignInBase<AuthUI.IdpConfig>
        Parameters:
        auth - the Firebase auth instance
        activity - from which to start the login, DO NOT USE OUTSIDE OF THIS METHOD!!!
        providerId - the provider to sign-in with (e.g. "microsoft.com")
      • handleNormalSignInFlow

        protected void handleNormalSignInFlow​(com.google.firebase.auth.FirebaseAuth auth,
                                              HelperActivityBase activity,
                                              com.google.firebase.auth.OAuthProvider provider)
      • buildOAuthProvider

        public com.google.firebase.auth.OAuthProvider buildOAuthProvider​(String providerId,
                                                                         com.google.firebase.auth.FirebaseAuth auth)
      • handleSuccess

        protected void handleSuccess​(boolean isUseEmulator,
                                     @NonNull
                                     String providerId,
                                     @NonNull
                                     com.google.firebase.auth.FirebaseUser user,
                                     @NonNull
                                     com.google.firebase.auth.OAuthCredential credential,
                                     boolean isNewUser,
                                     boolean setPendingCredential)
      • handleSuccess

        protected void handleSuccess​(boolean isUseEmulator,
                                     @NonNull
                                     String providerId,
                                     @NonNull
                                     com.google.firebase.auth.FirebaseUser user,
                                     @NonNull
                                     com.google.firebase.auth.OAuthCredential credential,
                                     boolean isNewUser)
      • handleMergeFailure

        protected void handleMergeFailure​(@NonNull
                                          com.google.firebase.auth.AuthCredential credential)
      • initializeForTesting

        public void initializeForTesting​(AuthUI.IdpConfig idpConfig)