Skip to content

Paywall&account - #12

Merged
MinjaeKim09 merged 5 commits into
mainfrom
paywall&account
Jul 11, 2026
Merged

Paywall&account#12
MinjaeKim09 merged 5 commits into
mainfrom
paywall&account

Conversation

@MinjaeKim09

Copy link
Copy Markdown
Owner

No description provided.

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.
@MinjaeKim09
MinjaeKim09 merged commit 830c643 into main Jul 11, 2026
2 checks passed
@MinjaeKim09
MinjaeKim09 deleted the paywall&account branch July 11, 2026 04:09
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