Class IdpResponse

  • All Implemented Interfaces:
    android.os.Parcelable

    public class IdpResponse
    extends java.lang.Object
    implements android.os.Parcelable
    A container that encapsulates the result of authenticating with an Identity Provider.
    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<IdpResponse> CREATOR
    • Method Detail

      • fromResultIntent

        @Nullable
        public static IdpResponse fromResultIntent​(@Nullable
                                                   android.content.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
      • from

        @NonNull
        public static IdpResponse from​(@NonNull
                                       java.lang.Exception e)
      • getErrorIntent

        @NonNull
        public static android.content.Intent getErrorIntent​(@NonNull
                                                            java.lang.Exception e)
      • withResult

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

        @NonNull
        public android.content.Intent toIntent()
      • isSuccessful

        public boolean isSuccessful()
      • getUser

        public User getUser()
      • getProviderType

        @Nullable
        public java.lang.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 java.lang.String getEmail()
        Get the email used to sign in.
      • getPhoneNumber

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

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

        @Nullable
        public java.lang.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()
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object