Switch to authentication using bearer token.

This commit is contained in:
Mike Cao committed 2022-01-23 00:33:06 -08:00
1 parent 698d4d2687
commit d8e831db50
8 files changed
+33 -35

No files matched your search

-15
View File
@@ -1,15 +0,0 @@
import { serialize } from 'cookie';
import { AUTH_COOKIE_NAME } from 'lib/constants';
import { ok } from 'lib/response';
export default async (req, res) => {
const cookie = serialize(AUTH_COOKIE_NAME, '', {
path: '/',
httpOnly: true,
maxAge: 0,
});
res.setHeader('Set-Cookie', [cookie]);
return ok(res);
};