-
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
Conversation
@lsirac let me know when you want code review to start (even if it's just on some parts) |
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
Show resolved
Hide resolved
Things to look for:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass. Mostly small comments, whatever formatter you used is very strange and throwing me off / creating a lot of noise.
I did not look at layouts or tests yet.
app/src/main/java/com/firebase/uidemo/auth/AnonymousUpgradeActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/firebase/uidemo/auth/SignedInActivity.java
Outdated
Show resolved
Hide resolved
auth/src/main/java/com/firebase/ui/auth/viewmodel/email/EmailLinkSignInHandler.java
Show resolved
Hide resolved
Exception { | ||
persistenceManager.clearAllData(getApplication()); | ||
if (!task.isSuccessful()) { | ||
return Tasks.forResult(task.getResult(Exception.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the task is not successful then calling getResult()
will throw right? Shouldn't this be Tasks.forException(task.getException())
? Maybe I am missing something,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but can't we just return the original task here anyway?
auth/src/main/java/com/firebase/ui/auth/viewmodel/email/EmailLinkSignInHandler.java
Show resolved
Hide resolved
auth/src/main/java/com/firebase/ui/auth/viewmodel/email/EmailLinkSignInHandler.java
Show resolved
Hide resolved
auth/src/main/java/com/firebase/ui/auth/viewmodel/email/EmailProviderResponseHandler.java
Outdated
Show resolved
Hide resolved
Some notes from playing around with this PR within the sample app:
In the end the flow does work (woot!) but there was a big flickering activity stack. I think you mentioned that in one of your self-review comments and I'll dig in and see if we can try to make that look nicer. |
I was able to get a crash by doing the following:
Not sure if that's expected? I assume the other way around should work (password first, then link the next time) right? Edit it does seem to work if I start with a password and then use a link. |
Some UI feedback on the "trouble signing in" flow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more very small comments. I think we're getting close to merge, any TODOs on your side?
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
Outdated
Show resolved
Hide resolved
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | ||
mProgressBar = view.findViewById(R.id.top_progress_bar); | ||
mListener = (TroubleSigningInListener) getActivity(); | ||
getView().setVisibility(View.GONE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what goes it look like at this point? Blank screen?
@lsirac by the way:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New progress bar looks great, 🚢 it!
(review assuming tests pass) |
Thanks Sam! To quickly respond:
|
Done. 👍 |
I will add the documentation in a separate PR |
Most of email link sign in (phase 1, meaning the flow needs to be completed on the same device)