feat(auth): DEBUG-Auto-Login (Memoro-Pattern)
Bei lokalen Xcode-Run-Builds wird beim Start automatisch eingeloggt wenn der Keychain leer ist. Spart das manuelle Login bei jedem Re-Install via Xcode. - Sources/Core/Auth/DebugCredentials.swift — #if DEBUG-gewrappte Founder-Credentials (tills95@gmail.com / Aa-123456789) - Sources/Core/Auth/AuthClient+EnsureSignedIn.swift — Extension ensureSignedIn() prüft .signedOut → signIn() in DEBUG - RootView.task ruft auth.ensureSignedIn() — Release-Builds No-Op (Release/TestFlight/App-Store bleiben unverändert, User muss manuell einloggen) Pattern 1:1 von memoro-native (gleiches File-Layout + Klassennamen). Build 9 → 10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
505aa9db19
commit
33101d703d
4 changed files with 52 additions and 12 deletions
|
|
@ -9,15 +9,20 @@ struct RootView: View {
|
|||
@State private var pendingDeepLinkSlug: String?
|
||||
|
||||
var body: some View {
|
||||
switch auth.status {
|
||||
case .signedIn:
|
||||
mainTabs
|
||||
.onOpenURL { url in handle(url: url) }
|
||||
.onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { activity in
|
||||
if let url = activity.webpageURL { handle(url: url) }
|
||||
}
|
||||
case .unknown, .signedOut, .signingIn, .error:
|
||||
LoginView()
|
||||
Group {
|
||||
switch auth.status {
|
||||
case .signedIn:
|
||||
mainTabs
|
||||
.onOpenURL { url in handle(url: url) }
|
||||
.onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { activity in
|
||||
if let url = activity.webpageURL { handle(url: url) }
|
||||
}
|
||||
case .unknown, .signedOut, .signingIn, .error:
|
||||
LoginView()
|
||||
}
|
||||
}
|
||||
.task {
|
||||
await auth.ensureSignedIn()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue