-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 7.2.0
- Loading branch information
Showing
18 changed files
with
215 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
auth/src/main/java/com/firebase/ui/auth/FirebaseAuthUIActivityResultContract.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.firebase.ui.auth; | ||
|
||
import android.content.Context; | ||
import android.content.Intent; | ||
|
||
import com.firebase.ui.auth.data.model.FirebaseAuthUIAuthenticationResult; | ||
|
||
import androidx.activity.result.contract.ActivityResultContract; | ||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
/** | ||
* A {@link ActivityResultContract} describing that the caller can launch authentication flow with a | ||
* {@link Intent} and is guaranteed to receive a {@link FirebaseAuthUIAuthenticationResult} as | ||
* result. The given input intent <b>must</b> be created using a | ||
* {@link com.firebase.ui.auth.AuthUI.SignInIntentBuilder} in order to guarantee a successful | ||
* launch of the authentication flow. | ||
*/ | ||
public class FirebaseAuthUIActivityResultContract extends | ||
ActivityResultContract<Intent, FirebaseAuthUIAuthenticationResult> { | ||
|
||
@NonNull | ||
@Override | ||
public Intent createIntent(@NonNull Context context, Intent input) { | ||
return input; | ||
} | ||
|
||
@Override | ||
@NonNull | ||
public FirebaseAuthUIAuthenticationResult parseResult(int resultCode, @Nullable Intent intent) { | ||
return new FirebaseAuthUIAuthenticationResult(resultCode, IdpResponse.fromResultIntent(intent)); | ||
} | ||
|
||
} |
Oops, something went wrong.