Skip to content

feat: remove email enumeration #2184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Expand Down Expand Up @@ -41,7 +41,7 @@
android:label="@string/title_auth_activity" />
<activity
android:name=".auth.AnonymousUpgradeActivity"
android:label="@string/title_anonymous_upgrade"/>
android:label="@string/title_anonymous_upgrade" />

<!-- Firestore demo -->
<activity
Expand Down Expand Up @@ -74,4 +74,4 @@

</application>

</manifest>
</manifest>
4 changes: 4 additions & 0 deletions auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ dependencies {
implementation(Config.Libs.Androidx.customTabs)
implementation(Config.Libs.Androidx.constraint)
implementation("androidx.credentials:credentials:1.3.0")
implementation("androidx.credentials:credentials-play-services-auth:1.3.0")

implementation(Config.Libs.Androidx.lifecycleExtensions)
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("com.google.android.libraries.identity.googleid:googleid:1.1.1")
annotationProcessor(Config.Libs.Androidx.lifecycleCompiler)

implementation(platform(Config.Libs.Firebase.bom))
Expand Down
4 changes: 2 additions & 2 deletions auth/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down Expand Up @@ -127,4 +127,4 @@

</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mKickstarter = new ViewModelProvider(this).get(SignInKickstarter.class);
mKickstarter.init(getFlowParams());
mKickstarter.getOperation().observe(this, new ResourceObserver<IdpResponse>(this) {
mKickstarter.getOperation().observe(this, new ResourceObserver<>(this) {
@Override
protected void onSuccess(@NonNull IdpResponse response) {
finish(RESULT_OK, response.toIntent());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.firebase.ui.auth.data.model;

import android.app.PendingIntent;
import android.content.IntentSender;

import com.firebase.ui.auth.ErrorCodes;
import com.firebase.ui.auth.FirebaseUiException;
Expand All @@ -11,19 +12,53 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class PendingIntentRequiredException extends FirebaseUiException {
private final PendingIntent mPendingIntent;
private final IntentSender mIntentSender;
private final int mRequestCode;

/**
* Constructor for cases when a PendingIntent is available.
*
* @param pendingIntent The PendingIntent required to complete the operation.
* @param requestCode The associated request code.
*/
public PendingIntentRequiredException(@NonNull PendingIntent pendingIntent, int requestCode) {
super(ErrorCodes.UNKNOWN_ERROR);
mPendingIntent = pendingIntent;
mIntentSender = null;
mRequestCode = requestCode;
}

@NonNull
/**
* Constructor for cases when an IntentSender is available.
*
* @param intentSender The IntentSender required to complete the operation.
* @param requestCode The associated request code.
*/
public PendingIntentRequiredException(@NonNull IntentSender intentSender, int requestCode) {
super(ErrorCodes.UNKNOWN_ERROR);
mIntentSender = intentSender;
mPendingIntent = null;
mRequestCode = requestCode;
}

/**
* Returns the PendingIntent, if available.
*
* @return The PendingIntent or null if not available.
*/
public PendingIntent getPendingIntent() {
return mPendingIntent;
}

/**
* Returns the IntentSender, if available.
*
* @return The IntentSender or null if not available.
*/
public IntentSender getIntentSender() {
return mIntentSender;
}

public int getRequestCode() {
return mRequestCode;
}
Expand Down

This file was deleted.

Loading
Loading