cookies working for some raeson now

This commit is contained in:
ntr committed 2022-08-08 21:36:46 +10:00
1 parent 413aeedadf
commit 65e603f222
4 files changed
+31 -16

No files matched your search

+2 -3
View File
@@ -104,11 +104,11 @@ export default function createApi(log: Log, pg: Pg, discogs) {
});
}
app.use(cors({ origin: false, credentials: true }));
app.use(cors({ credentials: true }));
app.use(bodyParser())
app.keys = [SECRET];
app.use(session(app));
app.use(session({ sameSite: 'None' }, app));
const { authRouter, passport } = routerAuth(log, pg);
app.use(passport.initialize());
@@ -120,7 +120,6 @@ export default function createApi(log: Log, pg: Pg, discogs) {
});
async function requireAuth(ctx, next) {
log.warn(ctx.isAuthenticated());
await next();
}