mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Implement redux.
This commit is contained in:
parent
9d8a2406e1
commit
5d4ff5cfa4
31 changed files with 341 additions and 85 deletions
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue