You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(run402): adopt @run402/functions v3 auth.* namespace in functions/
v3.0.0 ships throwing-sentinel getUser/getUserId/getRole — every existing
caller would crash with R402_AUTH_UNKNOWN_EXPORT at runtime. Replace each
`await getUser(req)` with `await auth.user()` across the 7 functions that
consult the actor; drop the defensive try/catch (auth.user() returns
Actor | null and never throws on anon). Test mocks of @run402/functions
get a parallel `auth.user` entry so the new code path is intercepted.
Scope intentionally limited to the v3 break: client-side localStorage →
HttpOnly cookie work (src/lib/auth.ts, src/lib/api.ts, six wl_session
readers in components) and SSR auth guards on admin pages remain
deferred until @run402/astro v2.0 ships and we get explicit go-ahead to
drop the Bearer-token flow.
Annotated the 4 adminDb() .eq('user_id', user.id) lookups with
`run402-allow-user-filter: …` so future doctor source-scans don't flag
them — they bypass RLS by design (actor bootstrap, role lookup pre-auth).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments