[#38] Adding several missing tests and correct CI setup

This commit is contained in:
Camille Moussu
2025-07-18 12:55:42 +02:00
parent 7c8b14e961
commit a52ded03fb
19 changed files with 2938 additions and 1278 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { Auth } from "./oidcAuth";
import { Loading } from "../../components/Loading/Loading";
import { Error } from "../../components/Error/Error";
import { push } from "redux-first-history";
import { redirectTo } from "../../utils/apiUtils";
export function HandleLogin() {
const userData = useAppSelector((state) => state.user.userData);
@@ -22,7 +23,7 @@ export function HandleLogin() {
})
);
window.location.assign(loginurl.redirectTo);
redirectTo(loginurl.redirectTo);
}
};
+4 -3
View File
@@ -1,4 +1,5 @@
import * as client from "openid-client";
import { getLocation } from "../../utils/apiUtils";
export const clientConfig = {
url: (window as any).SSO_BASE_URL ?? "",
@@ -49,14 +50,14 @@ export async function Logout() {
export async function Callback(code_verifier: string, state: any) {
try {
const openIdClientConfig = await getClientConfig();
const currentUrl = new URL(window.location.href);
const currentLocation = getLocation();
console.log("Callback URL:", currentUrl.toString());
console.log("Callback URL:", currentLocation);
console.log("Code verifier:", code_verifier);
const tokenSet = await client.authorizationCodeGrant(
openIdClientConfig,
currentUrl,
new URL(currentLocation),
{
pkceCodeVerifier: code_verifier,
expectedState: state,