fix(auth): unify imported sessions with account gating

This commit is contained in:
jjbrunton committed 2026-08-08 16:53:55 +01:00
1 parent 654bbda457
commit ea92a1a92b
15 files changed
+123 -49

No files matched your search

+4
View File
@@ -27,6 +27,10 @@ function appWithBrowser(state: 'authenticated' | 'login-required' | 'unreachable
app.use(
createLoginRouter({
services: {
accountAuth: {
ensureFullyAuthenticated: async () => state === 'authenticated',
getSnapshot: () => ({ redditUsername: state === 'authenticated' ? 'example-account' : null }),
},
browser: {
isSessionValid: async () => state === 'authenticated',
getAuthenticatedUsername: async () => state === 'authenticated' ? 'example-account' : null,