Skip to content

Add login page with Sign in with Apple and Google#43

Draft
muvaf wants to merge 1 commit into
mainfrom
cursor/login-page-google-apple-6b7a
Draft

Add login page with Sign in with Apple and Google#43
muvaf wants to merge 1 commit into
mainfrom
cursor/login-page-google-apple-6b7a

Conversation

@muvaf

@muvaf muvaf commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves LIM-285Build a login page with Google and Apple ID.

Adds a polished SwiftUI login screen to the sample iOS app with:

  • Sign in with Apple using AuthenticationServices (SignInWithAppleButton). Full name and email scopes are requested and propagated to the session model.
  • Sign in with Google — pixel‑styled Google button (multicolor G logo, white background, subtle stroke) that drives the local AuthSession. Wiring up the GoogleSignIn SDK requires an OAuth client ID and SPM dependency, which would block this sample app from building without project secrets, so the button uses a local stub. Replacing handleGoogleTap with a GIDSignIn.sharedInstance.signIn call is the only change needed once those are configured.
  • Continue with Email placeholder for future email/password flow.
  • Status banner that surfaces errors (e.g. Apple cancellation, missing iCloud) inline below the buttons.
  • After sign‑in, the app routes to a welcome screen showing the provider, display name and email, with a Sign Out button that returns to login.
  • Smooth crossfade animation between login and welcome states.
  • Accessibility identifiers on every interactive element to make UI testing straightforward.

Files

  • sample-native-app/AuthSession.swiftAuthSession / SignedInUser / AuthProvider model types.
  • sample-native-app/LoginView.swift — Login UI, Apple/Google/email buttons, status handling.
  • sample-native-app/ContentView.swift — Routes between LoginView and the welcome screen.

Walkthrough

Login screen

Login screen

After Google sign-in

Welcome screen after Google sign-in

Apple sign-in error handling (no iCloud account on simulator)

Apple sign-in error inline status

End-to-end demo

login_flow_google.mp4

Preview

Open in a remote simulator:

https://console.limrun.com/preview?asset=lim-285-login-page.zip&platform=ios

Notes

  • iOS deployment target stays at 26.0 / 26.2 as before. No third‑party packages or Xcode project changes were required — the project uses PBXFileSystemSynchronizedRootGroup, so the two new Swift files were automatically picked up.
  • Build verified with lim xcode build . (succeeded).
  • Manual end-to-end test performed with lim ios perform: tapping "Sign in with Google" routes to the welcome screen, "Sign Out" returns to login, and "Sign in with Apple" correctly invokes Apple's ASAuthorizationController.

To show artifacts inline, enable in settings.

Linear Issue: LIM-285

Open in Web Open in Cursor 

- Add LoginView with branded buttons for Apple (AuthenticationServices)
  and Google sign-in, plus an email option.
- Add AuthSession model to track the signed-in user.
- Update ContentView to switch between the login page and a welcome
  screen with sign-out support.

Resolves LIM-285.

Co-authored-by: muvaffak <me@muvaf.com>
@github-actions

Copy link
Copy Markdown

Limrun Preview

Platform Commit Preview
iOS c3adcd9 Open Preview →

Reviewer must be a member of the organization on Limrun.

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.

2 participants