[#38] Adding several missing tests and correct CI setup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user