mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Changed JWT implementation.
This commit is contained in:
parent
cb0c912c5b
commit
f3f0ad15f2
6 changed files with 48 additions and 13 deletions
12
pages/api/verify.js
Normal file
12
pages/api/verify.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { verifySecureToken } from 'lib/crypto';
|
||||
|
||||
export default async (req, res) => {
|
||||
const { token } = req.body;
|
||||
|
||||
try {
|
||||
const payload = await verifySecureToken(token);
|
||||
res.status(200).send(payload);
|
||||
} catch {
|
||||
res.status(400).send('');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue