Fix logging in after logging out + other navigation to main page #104
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.
Summary
Trello task: Logging in doesn't work after logging out
Original issue: logging in after logging out would sign in correctly using Google, but would not navigate to the home page.
Root cause: the sign out button needs to navigate to
Logic
, notLogin
.Logic
contains aLogin
as well as the home/onboarding widgets, and listens for changes to the authentication provider, which is what allows logging into navigate to the home/onboarding page.Follow ups:
main_common
to clean up first time login logic because it was kind of a messLogic
toMain
(for clarity)HomeOrOnBoarding
class intoMain
(for simplification)Main
into stateless widget that uses aFutureBuilder
for checking first time login instead of super stateful widget with super sus 3 sec timerasync
s andawait
s inProfile
,Login
, andAuthProvider
(for safety with asynchronous code)pushAndRemoveUntil
so that it removes all pages and pushes aMain
(fixes issue where you can't log in after logging out)popUntil
with the first route instead of a named routeTest Plan
Test each of the following with both a new user and a returning user (to make sure navigating back to the homepage/login is correct even with onboarding)
Log in and log out (as new and returning user)
Record_2022-11-15-20-39-39.mp4
Finish requesting ride
Record_2022-11-15-20-43-04.mp4
Finish cancelling ride
Record_2022-11-16-19-45-31.mp4
Cancel in middle of requesting ride
Record_2022-11-16-19-50-48.mp4
Notes