From 0b2d65a4e9b80f93b09723df083a0aaf4854ef26 Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Thu, 18 Jun 2026 02:27:31 -0400 Subject: [PATCH] Add Authentik sign-in, fix tab scroll insets, and polish multi-account auth. Mobile app detects SSO per server, supports OAuth sign-in, and preserves saved sessions when adding accounts. Tab screens get proper chrome layout and tab-bar clearance with scrollable page headers. Co-authored-by: Cursor --- app/(app)/_layout.tsx | 10 +- app/(app)/settings.tsx | 33 ++-- app/(auth)/register.tsx | 47 +++-- app/(auth)/sign-in.tsx | 242 ++++++++++++++++------- components/AccountSwitcher.tsx | 9 +- components/AuthServerPicker.tsx | 9 +- components/PageHeader.tsx | 8 +- components/TabPage.tsx | 14 +- components/TabScrollView.tsx | 23 ++- components/TopChromeBar.tsx | 6 +- components/time-clock/TimeClockPanel.tsx | 17 +- contexts/AppLockContext.tsx | 50 +++-- contexts/AuthContext.tsx | 27 +-- lib/add-account.ts | 12 ++ lib/auth-capabilities.ts | 21 ++ lib/auth-oauth.ts | 15 ++ lib/auth-storage.ts | 27 +++ lib/complete-sign-in.ts | 34 ++++ lib/tab-bar-insets.ts | 11 ++ lib/tab-layout.ts | 3 +- widgets/TimeClockActivity.tsx | 31 +-- 21 files changed, 449 insertions(+), 200 deletions(-) create mode 100644 lib/add-account.ts create mode 100644 lib/auth-capabilities.ts create mode 100644 lib/auth-oauth.ts create mode 100644 lib/complete-sign-in.ts diff --git a/app/(app)/_layout.tsx b/app/(app)/_layout.tsx index a49528b..d676301 100644 --- a/app/(app)/_layout.tsx +++ b/app/(app)/_layout.tsx @@ -31,7 +31,7 @@ export default function AppLayout() { disableTransparentOnScrollEdge backgroundColor={Platform.OS === "android" ? colors.background : undefined} > - + Dashboard - + Timer - + Entities - + Invoices - + { - await authClient.signOut(); - await clearActiveAccount(); - router.replace("/(auth)/sign-in"); - }} + onPress={() => void startAdditionalAccountSignIn(clearActiveAccount)} /> {accounts.length > 1 ? ( @@ -336,6 +333,19 @@ export default function SettingsScreen() { + + + Version + {appVersion} + + + Platform + + {Constants.platform?.ios ? "iOS" : "Other"} + + + + ) : null} - - - Version - {appVersion} - - - Platform - - {Constants.platform?.ios ? "iOS" : "Other"} - - - -