Skip to content

Commit ce69ff9

Browse files
author
Alejandro Endo
committed
Enable email/password users to sign in using email/link
This is specially necessary for newly, externally created users that have never logged in
1 parent 2f95eb9 commit ce69ff9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

auth/src/main/java/com/firebase/ui/auth/util/data/ProviderUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ public Task<List<String>> then(@NonNull Task<SignInMethodQueryResult> task) {
212212
}
213213
}
214214

215+
if (allowedProviders.contains(EMAIL_LINK_PROVIDER) && methods.contains(EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD) && !methods.contains(EMAIL_LINK_PROVIDER)) {
216+
lastSignedInProviders.add(0, signInMethodToProviderId(EMAIL_LINK_PROVIDER));
217+
}
218+
215219
if (task.isSuccessful() && lastSignedInProviders.isEmpty()
216220
&& !methods.isEmpty()) {
217221
// There is an existing user who only has unsupported sign in methods

0 commit comments

Comments
 (0)