Paywall&account - #12
Merged
Merged
Conversation
Integrates user authentication and in-app purchase functionality. - Add AuthenticationService and AuthenticationView to support Sign in with Apple, Google, and guest sign-in; handle nonce generation and Google sign-in flow. - Refactor UserManager to support auth states, persist/migrate legacy user data, and expose sign-out/delete flows. - Initialize Firebase and GoogleSignIn in AppDelegate; add GoogleService-Info.plist and URL schemes (Info.plist changes and project.pbxproj updates). - Add StoreManager using StoreKit 2 with product fetching, purchase/restore flows, transaction listener, and entitlement verification. - Add PaywallView and DailyStories.storekit product definition; wire StoreManager into app and settings. - Update ContentView, DashboardView, SettingsView and LingoLogApp to use the new auth and store managers, replace NameOnboardingView with AuthenticationView, and add account/purchase UI. - Update project.pbxproj to reference firebase-ios-sdk and GoogleSignIn packages, configure Info.plist usage, and include helper scripts (update_pbxproj.rb, update_url_scheme.rb). These changes enable sign-in (Apple/Google) and a one-time non-consumable purchase flow for "Daily Stories", while migrating legacy name-onboarding behavior.
Switch Daily Stories from a one-time product to a monthly subscription and introduce a secured backend. Key changes: - StoreManager: handle recurring product id (com.lingolog.dailystories.monthly), track active subscription state, store latest subscription JWS, manage subscriptions UI flow and App Store verification. - GeminiService & StoryViewModel: route story generation through a protected proxy endpoint and require subscription JWS. - Add Firebase Functions (generateDailyStory): verifies Apple StoreKit JWS, enforces one-story-per-day quota, calls Gemini with private key. - Update UI (Paywall, StoryHome, StoryHistory, Settings, Dashboard), AppConfig, storekit, Secrets example, Xcode scheme, firebase config and gitignore. - Includes emulator/dev files (functions/, firebase.json) and debug logs.
Set the default Firebase project, ignore environment variant files, and point the app config to the deployed daily story and translation Cloud Functions URLs.
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.
No description provided.