debug
Some checks failed
Docker Image CI / docker-build (push) Has been cancelled

This commit is contained in:
Marcin Czop 2025-06-29 13:49:09 +02:00
parent 101efa2605
commit 97101cfcc3

View file

@ -37,11 +37,6 @@ app.get("/auth/logout", async (c) => {
return c.json({ status: 200, message: "OK" }); 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) => { app.get("/auth/callback", async (c: Context) => {
c.set("oidcClaimsHook", oidcClaimsHook); c.set("oidcClaimsHook", oidcClaimsHook);
return processOAuthCallback(c); return processOAuthCallback(c);
@ -50,12 +45,10 @@ app.get("/auth/callback", async (c: Context) => {
app.use(logger(), compress()); app.use(logger(), compress());
app.use("/", serveStatic({ root: "./public" })); app.use("/", serveStatic({ root: "./public" }));
app.use("/auth/*", oidcAuthMiddleware()); app.use("/auth/*", oidcAuthMiddleware());
app.use("/auth/*", async (c, next) => {
app.get("/auth/login", async (c) => {
const auth = await getAuth(c); const auth = await getAuth(c);
if (!auth) { return c.json({ status: 200, message: "OK", data: auth });
return c.json({ status: 401, message: "Unauthorized" }, 401);
}
await next();
}); });
app.route("/", api); app.route("/", api);