mirror of
https://github.com/MrTalon63/NeoMap.git
synced 2026-01-11 03:49:13 +01:00
debug
This commit is contained in:
parent
6986ab1ec5
commit
101efa2605
1 changed files with 14 additions and 14 deletions
|
|
@ -28,6 +28,20 @@ const oidcClaimsHook = async (orig: OidcAuth | undefined, claims: IDToken | unde
|
|||
};
|
||||
};
|
||||
|
||||
app.get("/auth/logout", async (c) => {
|
||||
const auth = await getAuth(c);
|
||||
if (!auth) {
|
||||
return c.json({ status: 401, message: "Unauthorized" }, 401);
|
||||
}
|
||||
await revokeSession(c);
|
||||
return c.json({ status: 200, message: "OK" });
|
||||
});
|
||||
|
||||
app.get("/auth/login", async (c) => {
|
||||
const auth = await getAuth(c);
|
||||
return c.json({ status: 200, message: "OK", data: auth });
|
||||
});
|
||||
|
||||
app.get("/auth/callback", async (c: Context) => {
|
||||
c.set("oidcClaimsHook", oidcClaimsHook);
|
||||
return processOAuthCallback(c);
|
||||
|
|
@ -44,20 +58,6 @@ app.use("/auth/*", async (c, next) => {
|
|||
await next();
|
||||
});
|
||||
|
||||
app.get("/auth/logout", async (c) => {
|
||||
const auth = await getAuth(c);
|
||||
if (!auth) {
|
||||
return c.json({ status: 401, message: "Unauthorized" }, 401);
|
||||
}
|
||||
await revokeSession(c);
|
||||
return c.json({ status: 200, message: "OK" });
|
||||
});
|
||||
|
||||
app.get("/auth/login", async (c) => {
|
||||
const auth = await getAuth(c);
|
||||
return c.json({ status: 200, message: "OK", data: auth });
|
||||
});
|
||||
|
||||
app.route("/", api);
|
||||
|
||||
app.get("/stats", async (c) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue