Class IdpResponse

  • All Implemented Interfaces:
    Parcelable

    public class IdpResponse
    extends Object
    implements Parcelable
    A container that encapsulates the result of authenticating with an Identity Provider.
    • Method Detail

      • fromResultIntent

        @Nullable
        public static IdpResponse fromResultIntent​(@Nullable
                                                   Intent resultIntent)
        Extract the IdpResponse from the flow's result intent.
        Parameters:
        resultIntent - The intent which onActivityResult was called with.
        Returns:
        The IdpResponse containing the token(s) from signing in with the Idp
      • getErrorIntent

        @NonNull
        public static Intent getErrorIntent​(@NonNull
                                            Exception e)
      • withResult

        @NonNull
        public IdpResponse withResult​(com.google.firebase.auth.AuthResult result)
      • toIntent

        @NonNull
        public Intent toIntent()
      • isSuccessful

        public boolean isSuccessful()
      • getUser

        public User getUser()
      • getProviderType

        @Nullable
        public String getProviderType()
        Get the type of provider. e.g. GoogleAuthProvider.PROVIDER_ID
      • isNewUser

        public boolean isNewUser()
        Returns true if this user has just signed up, false otherwise.
      • getEmail

        @Nullable
        public String getEmail()
        Get the email used to sign in.
      • getPhoneNumber

        @Nullable
        public String getPhoneNumber()
        Get the phone number used to sign in.
      • getIdpToken

        @Nullable
        public String getIdpToken()
        Get the token received as a result of logging in with the specified IDP
      • getIdpSecret

        @Nullable
        public String getIdpSecret()
        Twitter only. Return the token secret received as a result of logging in with Twitter.
      • getError

        @Nullable
        public FirebaseUiException getError()
        Get the error for a failed sign in.
      • getCredentialForLinking

        @Nullable
        public com.google.firebase.auth.AuthCredential getCredentialForLinking()
      • hasCredentialForLinking

        @Nullable
        public boolean hasCredentialForLinking()
      • isRecoverableErrorResponse

        public boolean isRecoverableErrorResponse()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object