Implement redux.

This commit is contained in:
Mike Cao 2020-08-04 22:45:05 -07:00
parent 9d8a2406e1
commit 5d4ff5cfa4
31 changed files with 341 additions and 85 deletions

View file

@ -1,8 +1,9 @@
import { parse } from 'cookie';
import { verifySecureToken } from './crypto';
import { AUTH_COOKIE_NAME } from './constants';
export default async req => {
const token = parse(req.headers.cookie || '')['umami.auth'];
export async function verifyAuthToken(req) {
const token = parse(req.headers.cookie || '')[AUTH_COOKIE_NAME];
return verifySecureToken(token);
};
}