fix(auth): unify imported sessions with account gating
This commit is contained in:
1 parent
654bbda457
commit
ea92a1a92b
15 files changed
+123
-49
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user