From d3d91f8be12e1bb596527a845e96324944c146bf Mon Sep 17 00:00:00 2001 From: Bailey Townsend Date: Tue, 10 Feb 2026 18:00:52 -0600 Subject: [PATCH 1/3] I think that's the session store Should be state store as well should be conf client commiting to swap I think that's the redirect appeasing my robotic overlords in the ci resolves setting a new session id everytime that rabbit redis cache and other updates pretend you don't see this till Saturday. I'll be at a football game also pretend like you didnt see this. changed to useRunTimeConfig for jwk --- app/components/Header/AuthModal.client.vue | 8 ++ modules/cache.ts | 7 ++ nuxt.config.ts | 2 + package.json | 1 + scripts/gen-jwk.ts | 11 ++ server/api/auth/atproto.get.ts | 26 ++--- server/api/auth/session.get.ts | 15 ++- server/plugins/oauth-client.ts | 20 ++++ server/routes/.well-known/jwks.json.get.ts | 11 ++ .../routes/oauth-client-metadata.json.get.ts | 6 +- server/utils/atproto/oauth-session-store.ts | 47 ++++---- server/utils/atproto/oauth-state-store.ts | 36 +++--- server/utils/atproto/oauth.ts | 106 +++++++++++++----- server/utils/atproto/storage.ts | 10 +- server/utils/server-session.ts | 3 +- shared/schemas/oauth.ts | 14 --- shared/schemas/publicUserSession.ts | 13 ++- shared/types/userSession.ts | 10 +- 18 files changed, 220 insertions(+), 126 deletions(-) create mode 100644 scripts/gen-jwk.ts create mode 100644 server/plugins/oauth-client.ts create mode 100644 server/routes/.well-known/jwks.json.get.ts delete mode 100644 shared/schemas/oauth.ts diff --git a/app/components/Header/AuthModal.client.vue b/app/components/Header/AuthModal.client.vue index f0f2ea263b..6f28f2aede 100644 --- a/app/components/Header/AuthModal.client.vue +++ b/app/components/Header/AuthModal.client.vue @@ -50,6 +50,14 @@ watch(handleInput, newHandleInput => { handleInput.value = normalized } }) + +watch(user, async newUser => { + if (newUser?.relogin) { + await authRedirect(newUser.did, { + redirectTo: route.fullPath, + }) + } +})