feat(auth): add email/password authentication flow with router redirect and localized errors - #5
Merged
Merged
Conversation
…cation operations
…teChanges verifications
CowboyGH
force-pushed
the
feature/email-password-auth
branch
from
January 9, 2026 06:15
2cb6d22 to
cacc367
Compare
CowboyGH
added a commit
that referenced
this pull request
Feb 3, 2026
* feat(auth): add email/password authentication flow with router redirect and localized errors (#5) * refactor(core): simplify AppFailure ctor and remove AsyncResult alias * feat(auth): add User entity and AuthRepository interface for authentication operations * feat(auth): add typed AuthFailure and Firebase mappers * feat(auth): implement AuthRepository using Firebase Authentication * test(auth): cover AuthRepositoryImpl * test(auth): enhance AuthRepositoryImpl tests with signOut and authStateChanges verifications * chore: add *.freezed.dart to .gitignore for Build Runner generated files * feat(auth): implement AuthBloc with authentication events and states * test(auth): cover AuthBloc * feat(auth): implement SignInPage and update routing for authentication * feat(debug): add Sign Out button to DebugScreen for testing AuthBloc * feat(auth): implement redirect logic and auth state listener in router * feat(auth): add localized error messages for authentication failures * docs(core): add descriptive comments for authentication failure classes * refactor(auth): simplify comments and documentation in authentication files and di * chore: remove empty .gitkeep files from unnecessary directories * chore: update Firebase dependencies to latest versions * fix(ci): add code generation step to CI/CD pipeline and Dockerfile * docs(core): update documentation for authentication failure classes * docs: update CHANGELOG.md * feat(auth): added Google Sign-In authentication (#6) * chore(ios): add Google Sign-In Info.plist config * feat(deps): add google_sign_in package to pubspec.yaml * feat(auth): add signInWithGoogle method to AuthRepository * feat(core): implement new AuthFailure classes for google auth integration, enhance l10n mapper and make it nullable * feat(auth): implement mapper for converting exceptions from google auth to AuthFailure * feat(auth): implement signInWithGoogle method in AuthRepositoryImpl * test(auth): cover signInWithGoogle method with tests * feat(core): register dependencies for google auth in DI and make setupDI method async * fix(auth): fix snack bar error handling on sign-in page * feat(auth): add google sign-in handler method to AuthBloc * test(auth): cover sign-in handler method with tests * feat(auth): add button for sign-in with google * docs: update CHANGELOG.md * feat: add devtools_options.yaml * refactor(auth): improve code readability by formatting method signatures * feat(auth): prevent multiple authentication requests during ongoing operations * feat(auth): log analytics events for sign-in, sign-up, sign-out, and Google sign-in actions * chore: add comment for Google sign-in handling * refactor(auth): replace BlocConsumer with BlocListener and remove loading state tracking for improved state handling * refactor(auth): replace TextEditingController with form field onSaved for email and password * feat(auth): enhance validator rules for email and password fields * feat(auth): update sign-in/sign-up toggle text for clarity and improved UX * refactor(auth): streamline functions syntax and reduce code length * refactor(router): rename variable for clarity in redirect logic * refactor(auth): simplify documentation for authentication methods * feat(auth): add sign-in/sign-up headline text * docs: update CHANGELOG.md * chore: update version to 0.3.0 in pubspec.yaml * fix(auth): add analytics verify() assertions to Bloc tests (CI fix)
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
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.
🚀 Summary
Adds an email/password authentication baseline on top of Firebase Auth, including domain user modeling, typed failures + mappers, repository + BLoC, auth-aware GoRouter redirects, localized error messages, and supporting maintenance/CI updates.
✨ Changes
Userdomain entity +UserMapper(FirebaseUser→ domainUser).AuthRepositorycontract andAuthRepositoryImpl(Firebase Authentication).AuthFailurehierarchy, incl.UnknownAuthFailure) +AuthFailureMapper(FirebaseAuthException→AuthFailure).AuthRepositoryImpl(success, Firebase exceptions, unexpected errors, auth state stream), incl. extra sign-out andauthStateChangesverifications.AuthBlocfor auth events/state handling + unit tests forAuthBloc.SignInPage) with sign in / sign up flow.DebugScreensign out action for quick manual verification./auth/*is public, other routes require authentication) and updated auth paths to/auth/*prefix.AuthFailure→ l10n mapper).AppFailureconstructor signature (message is now positional), removedAsyncResult<T>, improved auth failure docs/comments, removed unnecessary.gitkeep, and updated Firebase deps..gitignoreto exclude generated*.freezed.dartfiles (Build Runner output).🛠 CI
build_runnercode generation in CI/Dockerfile.🧪 Verification
flutter analyzeflutter test