mirror of
https://github.com/tale/headplane.git
synced 2026-09-04 11:15:42 +00:00
chore(auth): add more informative logs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { data, redirect } from "react-router";
|
||||
|
||||
import { appConfigContext, authContext, oidcContext } from "~/server/context";
|
||||
import { logOidcError } from "~/server/oidc/provider";
|
||||
import { createOidcStateCookie } from "~/utils/oidc-state";
|
||||
|
||||
import type { Route } from "./+types/oidc-start";
|
||||
@@ -22,6 +23,7 @@ export async function loader({ request, context }: Route.LoaderArgs) {
|
||||
|
||||
const result = await service.startFlow();
|
||||
if (!result.ok) {
|
||||
logOidcError("OIDC start failed", result.error);
|
||||
return redirect(`/login?s=${result.error.code}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user