Add login page with Sign in with Apple and Google#43
Draft
muvaf wants to merge 1 commit into
Draft
Conversation
- 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>
|
Limrun Preview
Reviewer must be a member of the organization on Limrun. |
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
Resolves LIM-285 — Build a login page with Google and Apple ID.
Adds a polished SwiftUI login screen to the sample iOS app with:
AuthenticationServices(SignInWithAppleButton). Full name and email scopes are requested and propagated to the session model.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. ReplacinghandleGoogleTapwith aGIDSignIn.sharedInstance.signIncall is the only change needed once those are configured.Files
sample-native-app/AuthSession.swift—AuthSession/SignedInUser/AuthProvidermodel types.sample-native-app/LoginView.swift— Login UI, Apple/Google/email buttons, status handling.sample-native-app/ContentView.swift— Routes betweenLoginViewand 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
PBXFileSystemSynchronizedRootGroup, so the two new Swift files were automatically picked up.lim xcode build .(succeeded).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'sASAuthorizationController.To show artifacts inline, enable in settings.
Linear Issue: LIM-285