Auth & account deletion
Authentication sits behind an AuthProvider. Use Sign in with Apple, skip auth entirely, or back it with your own service — and whenever an account exists, DeliciousKit ships the in-app account deletion Apple requires (App Review Guideline 5.1.1(v)).
Wire it up
LaunchGate(config: .myApp,
provider: PreviewPurchaseProvider(),
authProvider: AppleAuthProvider()) {
ContentView()
}
AppleAuthProvider()— Sign in with Apple.NoAuthProvider(the default) — no accounts; the Account section auto-hides in Settings.- Implement
AuthProvideryourself to back it with your own identity service.
Firebase Auth
import DeliciousKitFirebase for email/password and anonymous auth:
LaunchGate(config: .myApp,
provider: PreviewPurchaseProvider(),
auth: FirebaseAuthProvider()) {
ContentView()
}
FirebaseAuthProvider()conforms toAuthProvider—currentUser(),signOut(), anddeleteAccount()work through the same interface as any other provider.- Anonymous auth works through
AuthController.signIn(method: .anonymous). - Email/password doesn't fit the
AuthMethodenum (it needs credentials, not just a method). CallFirebaseAuthProvider().signIn(email:password:)or.createAccount(email:password:)directly from your own sign-in screen, then hand the resultingAuthUserto yourAuthController. - If you offer Firebase email/Google sign-in, you must also offer Sign in with Apple (
AppleAuthProvider) — Apple requires it whenever any third-party sign-in is present (Guideline 4.8). - Requires
GoogleService-Info.plistin your app target andFirebaseApp.configure()called once at launch (in yourApp.init()), before anyAuth.auth()call.
Account deletion (required)
When the user is signed in, AccountDeletionView is reachable automatically from Settings. It confirms destructively, deletes the account and its associated data, and signs out — satisfying App Review's requirement for an in-app deletion path, not a "email us to delete" link.
This is one of the most common rejection reasons for apps with accounts, so it's built in rather than left to you. The compliance rationale lives in the Delicious Compliance skill.