-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Email link sign in (Phase 1) #1486
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
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
45e1e21
Most of the implementation and tests for email link sign in phase 1
lsirac aba1fcf
Fix auth:checkstyle error
lsirac e6e2fb3
Added loading animation
lsirac c4c43e6
Handle the invalid link flow (link is malformed, expired, or has alre…
lsirac fe06a27
Fix broken tests
lsirac b4d45dc
Changes from code review
lsirac 6641ba5
More changes from code review
lsirac ff4a0f2
Adds circular loading progress bar while sending an email in EmailLin…
lsirac 63fcb62
Removed redundant declarations and added annotations
lsirac 65f4bd1
Fixes InvisibleFragment
lsirac 0292dbf
Add transition from EmailLinkFragment to TroubleSigningInFragment
lsirac e37f42f
Show an error message when trying to sign in with email link when it …
lsirac d5027c4
Fix anonymous upgrade demo
lsirac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
|
||
import com.firebase.ui.auth.AuthUI; | ||
import com.firebase.uidemo.R; | ||
import com.google.firebase.auth.ActionCodeSettings; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
|
@@ -49,8 +50,6 @@ public static boolean isGitHubMisconfigured(@NonNull Context context) { | |
@NonNull | ||
public static List<AuthUI.IdpConfig> getConfiguredProviders(@NonNull Context context) { | ||
List<AuthUI.IdpConfig> providers = new ArrayList<>(); | ||
providers.add(new AuthUI.IdpConfig.EmailBuilder().build()); | ||
lsirac marked this conversation as resolved.
Show resolved
Hide resolved
|
||
providers.add(new AuthUI.IdpConfig.PhoneBuilder().build()); | ||
|
||
if (!isGoogleMisconfigured(context)) { | ||
providers.add(new AuthUI.IdpConfig.GoogleBuilder().build()); | ||
|
@@ -68,6 +67,22 @@ public static List<AuthUI.IdpConfig> getConfiguredProviders(@NonNull Context con | |
providers.add(new AuthUI.IdpConfig.GitHubBuilder().build()); | ||
} | ||
|
||
ActionCodeSettings actionCodeSettings = ActionCodeSettings.newBuilder() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: could be a constant within the demo app. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How would that work? |
||
.setAndroidPackageName("com.firebase.uidemo", true, null) | ||
.setHandleCodeInApp(true) | ||
.setUrl("https://google.com") | ||
.build(); | ||
|
||
providers.add(new AuthUI.IdpConfig.EmailBuilder() | ||
.setAllowNewAccounts(true) | ||
.enableEmailLinkSignIn() | ||
.setActionCodeSettings(actionCodeSettings) | ||
.build()); | ||
|
||
|
||
providers.add(new AuthUI.IdpConfig.PhoneBuilder().build()); | ||
|
||
|
||
return providers; | ||
} | ||
} |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.