various small fixes

This commit is contained in:
miloschwartz
2025-04-29 22:59:38 -04:00
parent 3ebc01df8c
commit 237960fc5b
11 changed files with 122 additions and 43 deletions

View File

@@ -23,7 +23,7 @@ import { oidcAutoProvision } from "./oidcAutoProvision";
import license from "@server/license/license";
const ensureTrailingSlash = (url: string): string => {
return url.endsWith('/') ? url : `${url}/`;
return url.endsWith("/") ? url : `${url}/`;
};
const paramsSchema = z
@@ -228,6 +228,16 @@ export async function validateOidcCallback(
req,
res
});
return response<ValidateOidcUrlCallbackResponse>(res, {
data: {
redirectUrl: postAuthRedirectUrl
},
success: true,
error: false,
message: "OIDC callback validated successfully",
status: HttpCode.CREATED
});
} else {
if (!existingUser) {
return next(