mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 12:49:16 +02:00
feat(federation): Finalize Versia 0.6 port
This commit is contained in:
parent
fca30b4dad
commit
b7e77097ba
20 changed files with 2788 additions and 439 deletions
|
|
@ -57,7 +57,12 @@ export const applyToHono = (app: Hono<HonoEnv>): void => {
|
|||
throw new ApiError(401, "Missing JWT cookie");
|
||||
}
|
||||
|
||||
const result = await verify(jwtCookie, config.authentication.key);
|
||||
const result = await verify(jwtCookie, config.authentication.key, {
|
||||
alg: "HS256",
|
||||
iss: config.http.base_url.toString(),
|
||||
}).catch(() => {
|
||||
throw new ApiError(401, "Invalid JWT");
|
||||
});
|
||||
|
||||
const { sub } = result;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue