chore: refactor sessions

This commit is contained in:
David Nguyen
2025-02-16 00:44:01 +11:00
parent 8d5fafec27
commit 1ed1cb0773
21 changed files with 261 additions and 307 deletions

View File

@ -21,7 +21,6 @@ export const auth = new Hono<HonoAuthContext>()
.use(async (c, next) => {
c.set('requestMetadata', extractRequestMetadata(c.req.raw));
// Todo: Maybe use auth URL.
const validOrigin = new URL(NEXT_PUBLIC_WEBAPP_URL()).origin;
const headerOrigin = c.req.header('Origin');
@ -54,9 +53,6 @@ export const auth = new Hono<HonoAuthContext>()
* Handle errors.
*/
auth.onError((err, c) => {
// Todo Remove
console.error(`${err}`);
if (err instanceof HTTPException) {
return c.json(
{