-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/state driven auth routing #140
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
Closed
Closed
Conversation
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
- Add new property 'postAuthRedirectIntent' to store intended navigation path after authentication - Update AppState copyWith method to handle new property - Include new property in AppState props for equality checks - Add comments to explain the purpose and usage of the new property
- Add new AppEvent for capturing navigation intents before authentication - This event will help track where users should be redirected after successful auth - Include GoRouterState as a property to represent the intended destination
- Add handling for PostAuthRedirectIntentCaptured events in AppBloc - Implement navigation to pending intent after user data is loaded - Store and clear post-auth redirect intent in AppState - Add GoRouter import for context navigation
- Introduce AuthFlow enum to differentiate between standard sign-in and account linking flows - Add flow property to AuthenticationState with default value of signIn - Update copyWith method to include flow parameter - Modify props list to include the new flow property
Add a new event to represent when an anonymous user initiates the account linking flow.
- Add AuthenticationLinkingInitiated event and handler - Update authentication flow logic for signing in and linking - Reset authentication flow to signIn after sign-out or linking
…ndling - Remove unnecessary parameters (headline, subHeadline, showAnonymousButton, isLinkingContext) from AuthenticationPage constructor - Implement dynamic content rendering based on AuthenticationBloc's flow state - Refactor leading IconButton to always show without condition - Update icon display based on authentication flow - Simplify sign-in button navigation by removing isLinkingContext check
- Remove isLinkingContext parameter from RequestCodePage - Remove context-sensitive navigation logic from _RequestCodeView - Simplify back navigation to always go to Authentication page - Remove conditional routing for code verification
- Remove query parameter 'context' as it's no longer needed - Add AuthenticationLinkingInitiated event to kick off linking process - Simplify navigation to authentication page
- Remove nested account linking routes and related parameters - Enhance redirect logic with detailed logging using logging package - Adjust authentication page to use BLoC state for display context - Simplify route protection logic and remove unnecessary comments
- Add Logger instance for AccountPage - Implement logging for account linking and sign-out actions - Replace BlocListener with context.pushNamed for authentication navigation - Update button actions with appropriate logging and navigation
- Add detailed comments to unauthenticated, authenticated, and anonymous states - Clarify the nature of user sessions in each state - Improve understanding of user session types and their implications
…w reset - Add comprehensive logging to AuthenticationBloc for better debugging - Implement AuthenticationFlowReset event to revert auth flow to signIn - Enhance AuthenticationLinkingInitiated event documentation - Improve AuthFlow enum descriptions - Conditionally display close button in AuthenticationPage for account linking flow - Strengthen router redirect logic for anonymous users
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Status
HOLD
Description
Type of Change