Skip to content

feat(auth): added Google Sign-In authentication - #6

Merged
CowboyGH merged 13 commits into
developfrom
feature/google-sign-in
Jan 13, 2026
Merged

CowboyGH merged 13 commits into
developfrom
feature/google-sign-in

Conversation

@CowboyGH

@CowboyGH CowboyGH commented Jan 12, 2026 •

Copy link
Copy Markdown
Owner

🚀 Summary

Adds Google Sign-In authentication on top of the existing Firebase Auth baseline, including repository support, typed Google auth failures + mapper, BLoC event handling, and a “Sign In With Google” entry point in the sign-in UI.

✨ Changes

  • ✅ Added signInWithGoogle() to the auth repository and implemented it in AuthRepositoryImpl using Google Sign-In + Firebase credential sign-in.
  • ✅ Added GoogleAuthFailureMapper to convert GoogleSignInException codes (e.g. canceled, uiUnavailable) into typed AuthFailure subclasses.
  • ✅ Extended AuthFailure hierarchy with Google-specific failures (cancel/interrupted/config/ui/user mismatch/unknown).
  • ✅ Added BLoC handling for Google sign-in flow (emits operationInProgress, then authError on failure).
  • ✅ Added “Sign In With Google” button to SignInPage that dispatches signInWithGoogleRequested.
  • 🧹 Adjusted sign-in error UI logic so SnackBar is shown only when there is a user-facing localized message.

🧪 Verification

  • Unit tests cover repository Google sign-in behavior (success + Google/Firebase/unexpected error cases).
  • Manual test (both on Android & iOS): open SignInPage → tap “Sign In With Google” → verify successful login changes auth state; canceling Google auth returns a typed cancel failure (no crash, info in console).

@CowboyGH CowboyGH changed the title feat(auth): Added Google Sign-In authentication. feat(auth): added google Sign-In authentication Jan 12, 2026
@CowboyGH CowboyGH changed the title feat(auth): added google Sign-In authentication feat(auth): added Google Sign-In authentication Jan 12, 2026
@CowboyGH CowboyGH self-assigned this Jan 13, 2026
@CowboyGH
CowboyGH marked this pull request as draft January 13, 2026 06:00
@CowboyGH
CowboyGH marked this pull request as ready for review January 13, 2026 06:00
@CowboyGH
CowboyGH merged commit 12df61f into develop Jan 13, 2026
3 checks passed
@CowboyGH
CowboyGH deleted the feature/google-sign-in branch February 3, 2026 03:54
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant