feat(auth): enforce login route with global middleware
This commit is contained in:
6
frontend/server/api/auth/session.get.ts
Normal file
6
frontend/server/api/auth/session.get.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { getAuthContext } from "../../utils/auth";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
await getAuthContext(event);
|
||||
return { authenticated: true };
|
||||
});
|
||||
Reference in New Issue
Block a user