From e845b2fbd473d374a233c8f5d305e30da54d073f Mon Sep 17 00:00:00 2001 From: Thomas Georgiadis Date: Sun, 22 Nov 2026 11:24:57 +1100 Subject: [PATCH] Move sign-in to Convex Auth 2.1.0 (#513) * Move sign-in to Convex Auth 2.1.0 The website moves to Convex Auth 2.1, which keeps Discord as a built-in sign-in method. The launcher calls the same functions by name, so only the library and convex versions change. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015HpW11e4ygyTegzUBvQD8B * Give Convex Auth the isAuthenticated query it now watches Convex Auth 2.1's provider watches isAuthenticated to sign out a revoked session straight away; without it the app's first render failed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015HpW11e4ygyTegzUBvQD8B --------- Co-authored-by: Claude --- apps/launcher/package.json | 4 +-- apps/launcher/src/account.tsx | 2 ++ pnpm-lock.yaml | 61 ++++++++++++++++------------------- 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/apps/launcher/package.json b/apps/launcher/package.json index a27b3e60..40916bea 100644 --- a/apps/launcher/package.json +++ b/apps/launcher/package.json @@ -12,7 +12,7 @@ "tauri": "tauri" }, "dependencies": { - "@convex-dev/auth": "2.0.0-beta.0", + "@convex-dev/auth": "2.1.0", "@lingui/core": "6.10.1", "@lingui/react": "6.10.1", "@quiverlauncher/api": "workspace:*", @@ -20,7 +20,7 @@ "@quiverlauncher/ui": "workspace:*", "@sentry/browser": "11.10.0", "@tauri-apps/api": "^2", - "convex": "^1.46.0", + "convex": "^1.51.0", "lucide-react": "^0.468.0", "react": "^19.2.0", "react-dom": "^19.2.0", diff --git a/apps/launcher/src/account.tsx b/apps/launcher/src/account.tsx index 80f3a4b4..196b289a 100644 --- a/apps/launcher/src/account.tsx +++ b/apps/launcher/src/account.tsx @@ -172,6 +172,8 @@ const ref = (type: T, name: string) = const fns = { refreshSession: ref("mutation", "auth:refreshSession"), signOut: ref("mutation", "auth:signOut"), + // Watched by Convex Auth so a revoked session signs out straight away. + isAuthenticated: ref("query", "auth:isAuthenticated"), signIn: ref("mutation", "auth:signInWithPassword"), signUp: ref("mutation", "auth:signUpWithPassword"), signInWithEmail: ref("mutation", "auth:signInWithEmailPassword"), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fed20b03..bbc3ad62 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ importers: apps/launcher: dependencies: '@convex-dev/auth': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0(convex@1.46.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3) + specifier: 2.1.0 + version: 2.1.0(convex@1.51.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3) '@lingui/core': specifier: 6.10.1 version: 6.10.1(@babel/core@7.29.7) @@ -35,8 +35,8 @@ importers: specifier: ^2 version: 2.12.1 convex: - specifier: ^1.46.0 - version: 1.46.0(react@19.3.0) + specifier: ^1.51.0 + version: 1.51.0(react@19.3.0) lucide-react: specifier: ^0.468.0 version: 0.468.0(react@19.3.0) @@ -299,12 +299,11 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} - '@convex-dev/auth@2.0.0-beta.0': - resolution: {integrity: sha512-GNIYITbRvLg8Ev5YW3j/rJ71Dft/fGYO5kkTJigVwuYCcn3WOeVY9+1IpKDntzMOZou1uDZwlPnR0BcWZWGaKg==} - hasBin: true + '@convex-dev/auth@2.1.0': + resolution: {integrity: sha512-C3fCWPIf74NJfl2SE8x7mUXHCx3nTX96QDRWFh4/tg/U3vuTpR6PZeLq3y63hsS9h/m1rzLElN42rXFENaGHLA==} peerDependencies: '@convex-dev/resend': ^0.2.8 - convex: ^1.46.0 + convex: ^1.48.0 next: ^16.0.0 react: ^18.0.0 || ^19.0.0 peerDependenciesMeta: @@ -1507,9 +1506,6 @@ packages: resolution: {integrity: sha512-fV1orZfsnPn9BaSByR/qE67rJCLJEy2Ox5bq7nJh+jquWaNh6Sfec75kJ2T6PtdGUbPQlrVoSVCEOa5SdiTQ1g==} engines: {node: '>=18'} - argon2id-wasm@0.0.0-alpha.2: - resolution: {integrity: sha512-Bxa3aVWUbpg/hKTyHdjeLT68mJXNLftm1W3tXVXu/X83vmpTJ3zzgOhNMzu33Th2iNDxMU1kU4/MEGgW5udMgQ==} - aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -1751,9 +1747,9 @@ packages: zod: optional: true - convex@1.46.0: - resolution: {integrity: sha512-dhBwDQTZDOhi5SUGAX17EWNehCdNq6/UFrSL0eLZuGfMkdsQbCVWVRZCzbZ5CF+/pgvoGxtApbEoTSipqL4JTw==} - engines: {node: '>=20.0.0', npm: '>=7.0.0'} + convex@1.51.0: + resolution: {integrity: sha512-Y5gS+JmT2JBq76S3CrQDrdL/Ijs4ZRKsvz3cu5EmHf/QxW18QrHunb5j9WC6lAbWbWc/gvmqpa5lvXzLXFQVJA==} + engines: {node: '>=22.0.0', npm: '>=7.0.0'} hasBin: true peerDependencies: '@auth0/auth0-react': ^2.0.1 @@ -2539,6 +2535,9 @@ packages: parse5@8.0.1: resolution: {integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==} + password-hash-wasm@0.0.0: + resolution: {integrity: sha512-SpVGWB4mMf8VuHM1LqrZWLPtH7B4K2vVqAZ6pAnL/eeTLtPqewwnt0DD7428xUPSDrEWd2SDoLoU4z61gj9sYw==} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -3390,20 +3389,16 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@convex-dev/auth@2.0.0-beta.0(convex@1.46.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3)': + '@convex-dev/auth@2.1.0(convex@1.51.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3)': dependencies: - '@babel/code-frame': 7.29.7 - '@convex-dev/batch-worker': 0.3.4(convex@1.46.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3) - '@convex-dev/rate-limiter': 0.3.2(convex@1.46.0(react@19.3.0))(react@19.3.0) + '@convex-dev/batch-worker': 0.3.4(convex@1.51.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3) + '@convex-dev/rate-limiter': 0.3.2(convex@1.51.0(react@19.3.0))(react@19.3.0) '@simplewebauthn/browser': 14.0.0 '@simplewebauthn/server': 14.0.3 - argon2id-wasm: 0.0.0-alpha.2 - chalk: 5.6.2 - commander: 14.0.3 - convex: 1.46.0(react@19.3.0) + convex: 1.51.0(react@19.3.0) cookie: 1.1.1 jose: 5.10.0 - ora: 9.4.1 + password-hash-wasm: 0.0.0 optionalDependencies: react: 19.3.0 transitivePeerDependencies: @@ -3412,10 +3407,10 @@ snapshots: - typescript - zod - '@convex-dev/batch-worker@0.3.4(convex@1.46.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3)': + '@convex-dev/batch-worker@0.3.4(convex@1.51.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3)': dependencies: - convex: 1.46.0(react@19.3.0) - convex-helpers: 0.1.126(convex@1.46.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3) + convex: 1.51.0(react@19.3.0) + convex-helpers: 0.1.126(convex@1.51.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3) transitivePeerDependencies: - '@standard-schema/spec' - hono @@ -3423,9 +3418,9 @@ snapshots: - typescript - zod - '@convex-dev/rate-limiter@0.3.2(convex@1.46.0(react@19.3.0))(react@19.3.0)': + '@convex-dev/rate-limiter@0.3.2(convex@1.51.0(react@19.3.0))(react@19.3.0)': dependencies: - convex: 1.46.0(react@19.3.0) + convex: 1.51.0(react@19.3.0) optionalDependencies: react: 19.3.0 @@ -4454,8 +4449,6 @@ snapshots: - bare-buffer - react-native-b4a - argon2id-wasm@0.0.0-alpha.2: {} - aria-query@5.3.0: dependencies: dequal: 2.0.3 @@ -4656,14 +4649,14 @@ snapshots: convert-source-map@2.0.0: {} - convex-helpers@0.1.126(convex@1.46.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3): + convex-helpers@0.1.126(convex@1.51.0(react@19.3.0))(react@19.3.0)(typescript@5.9.3): dependencies: - convex: 1.46.0(react@19.3.0) + convex: 1.51.0(react@19.3.0) optionalDependencies: react: 19.3.0 typescript: 5.9.3 - convex@1.46.0(react@19.3.0): + convex@1.51.0(react@19.3.0): dependencies: esbuild: 0.27.0 prettier: 3.9.9 @@ -5760,6 +5753,8 @@ snapshots: dependencies: entities: 8.1.0 + password-hash-wasm@0.0.0: {} + path-key@3.1.1: {} path-scurry@1.11.1: