src/auth.ts) and forwards authjs.session-token / __Secure-authjs.session-token to the API from server actions and the tools API proxy (callServerAction.ts, callServerActionNoError.ts, src/app/tools/api/[[...server]]/route.ts). Membership switching also reads those cookies (src/app/tools/notifications/switch-membership/actions.ts).authjs.session-token or authjs.session_token, resolves Session in Mongo (src/routes/login.ts), then loads user, membership, and company—this is the path most protected routes use today./auth/inspector and /auth/contact (src/routes/login.ts, src/util/functions/betterAuth/auth.ts), with session storage mapped onto the existing session shape (e.g. sessionToken / expires fields).Frontend
src/auth.ts, auth route handlers under the app router, and any code that assumes NextAuth session shape or authjs.session-token for API calls.Backend
src/routes/login.ts (and related session/user loading) remains consistent with Better Auth sessions for staff/web users, in line with src/util/functions/betterAuth/auth.ts and existing Session / User / Membership models.src/routes/authenticate.ts remains the legacy HTTP surface for user lookup, invites, and related flows; scope includes whatever coupling exists between that surface and the eventual web login stack.Config / ops
BETTER_AUTH_URL, BETTER_AUTH_SECRET / AUTH_SECRET, SERVER_URL) in auth.ts may need to cover admin.attik.ai and cookie domains as part of rollout—decision needed on host and cookie policy.attik-backend/src/routes/login.ts, attik-backend/src/util/functions/betterAuth/auth.tsattik-frontend/src/auth.ts, attik-frontend/src/app/tools/api/[[...server]]/route.tsPlease authenticate to join the conversation.
Completed
Main App
3 months ago
Linear
Get notified by email when there are changes.
Completed
Main App
3 months ago
Linear
Get notified by email when there are changes.