Skip to content

feat: Google sign-in on iOS (Flutter client + iOS OAuth client ID) #53

Description

@shukebeta

Problem

Google sign-in ships on Android + Web (backend SHUKE-LABS/HappyNotes.Api#28, credentials #29). The iOS client has no Google sign-in. The Flutter app builds for iOS directly and iOS is on the roadmap, so iOS needs Google sign-in wired to the existing backend.

Conclusion

Extend the existing Android/Web Google sign-in stack to iOS. The Flutter-side change is small and well understood; it reuses the existing backend /Account/GoogleLogin (#28) and the same JWT storage + request-interceptor flow already used on Android/Web. No backend change is needed.

Approach

  • Make the Google sign-in path available on iOS: the service's availability guard must include iOS (currently Android/Web only), keeping the credentials-empty → button-hidden behaviour.
  • On iOS, initialise the plugin with the iOS OAuth clientId while continuing to pass the existing server/web ID as serverClientId, so the returned idToken's audience remains the backend. On the native authenticate() path, send the resulting Google ID token to /Account/GoogleLogin and store the returned HappyNotes JWT exactly as on Android.
  • Add a config accessor for the iOS client ID (empty default, so the button stays hidden until the credential is provided), parallel to the existing server-client-id accessor.
  • Wire the iOS URL scheme: add a CFBundleURLTypes entry in ios/Runner/Info.plist with the reversed-client-id URL scheme for the OAuth redirect.

(File-by-file steps are the planner's job; the implementation-grounding comment on this issue names the exact seams.)

Pickup inputs (required before claiming)

  • iOS Google OAuth client ID (extends feature/refactoring #29, which provisioned Android/Web only) — supplied to the delivery agent at pickup as configuration (never committed). The reversed-client-id URL scheme and the runtime clientId both need this value.
  • A macOS delivery/verification environment (Xcode + iOS Simulator). The sole acceptance criterion is Simulator-based; a Linux-only environment can run flutter analyze and unit tests but cannot exercise or verify acceptance. Claim only from an iOS-capable environment.

Acceptance criteria

  • On the iOS Simulator, using the supplied OAuth client ID, a user can sign in with Google and receive a HappyNotes JWT, reusing the existing account link/create behaviour.
  • No regression to Android or Web Google sign-in.

Non-goals

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedblocked pending product/scope decisionenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions