Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
PR_FILTER: "protected"
MERGE_MSG: "Auto-update feature branch with changes from the main branch"
MERGE_CONFLICT_ACTION: "ignore"
EXCLUDED_LABELS: "dependencies"
38 changes: 34 additions & 4 deletions src/ui/components/LoginComponent/AcmLoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,53 @@
import { useMsal } from "@azure/msal-react";
import { Button, ButtonProps } from "@mantine/core";

import { InteractionStatus } from "@azure/msal-browser";
import { useAuth } from "../AuthContext/index.js";
import { notifications } from "@mantine/notifications";
import { IconAlertCircle } from "@tabler/icons-react";

function clearAllDomainCookies() {
const cookies = document.cookie.split(";");

for (const cookie of cookies) {
const eqPos = cookie.indexOf("=");
const name = eqPos > -1 ? cookie.substring(0, eqPos).trim() : cookie.trim();
// Setting a cookie's expiration to the past deletes it.
document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
}
}

export function AcmLoginButton(
props: ButtonProps &
React.ComponentPropsWithoutRef<"button"> & { returnTo: string },
) {
const { loginMsal } = useAuth();
const { inProgress } = useMsal();

const handleLogin = async () => {
if (inProgress !== InteractionStatus.None) {
clearAllDomainCookies();
}

try {
await loginMsal(props.returnTo);
} catch (error) {
notifications.show({
title: "Login failed",
message: "Please clear your cookies and try again.",
color: "red",
icon: <IconAlertCircle size={16} />,
});
console.error("An unexpected error occurred during login:", error);
}
};

return (
<Button
leftSection={null}
color="#FF5F05"
variant="filled"
{...{ ...props, returnTo: undefined }}
onClick={async () => {
await loginMsal(props.returnTo);
}}
onClick={handleLogin}
/>
);
}
56 changes: 28 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"@smithy/util-utf8" "^4.0.0"
tslib "^2.6.2"

"@aws-sdk/client-dynamodb@^3.859.0":
"@aws-sdk/client-dynamodb@^3.797.0":
version "3.859.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/client-dynamodb/-/client-dynamodb-3.859.0.tgz#c43674f332afd5ddfc0779f593760076772aed5a"
integrity sha512-Bt840uICsGcn7IFewif8ARCF0CxtdTx9DX/LfUGRI+SVZcqyeEccmH2JJRRzThtEzKTXr+rCN6yaNB3c4RQY2g==
Expand Down Expand Up @@ -173,7 +173,7 @@
tslib "^2.6.2"
uuid "^9.0.1"

"@aws-sdk/client-lambda@^3.859.0":
"@aws-sdk/client-lambda@^3.835.0":
version "3.859.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/client-lambda/-/client-lambda-3.859.0.tgz#b9146504cfbdd4994b4c0a91fa0c5d28b3583c44"
integrity sha512-p9/6TrAESLLajn9ytJs6S6ErXyyEbxlO6v44oPXiDeNRKVQxevkG+brAfHDmh7dZk9EQkmyp5AWqo1dZrpkhdg==
Expand Down Expand Up @@ -270,7 +270,7 @@
tslib "^2.6.2"
uuid "^9.0.1"

"@aws-sdk/client-ses@^3.859.0":
"@aws-sdk/client-ses@^3.797.0":
version "3.859.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/client-ses/-/client-ses-3.859.0.tgz#586fce51681a40bbae7bc0f0cd96e5d3a5895550"
integrity sha512-ek+4EfDjSxl5spTuNp/BmViiipmtLWyDqoQZZwGaISiSJA5x1G5kDa28GnO92e+3jcPLjrJY8Q0P/CWrHJz/vQ==
Expand Down Expand Up @@ -316,7 +316,7 @@
"@smithy/util-waiter" "^4.0.6"
tslib "^2.6.2"

"@aws-sdk/client-sqs@^3.859.0":
"@aws-sdk/client-sqs@^3.797.0":
version "3.859.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/client-sqs/-/client-sqs-3.859.0.tgz#bcdc5ca03e8a3b0508326c48ac58d18f67a2c42d"
integrity sha512-u019wKVqtk6RxINTaTCpV0p7o5cun0aZSlhs1JNYGFHtSRUjxqbhRIMzkTZgUkABUwkbmPg4k72YlE/N17zdSw==
Expand Down Expand Up @@ -407,7 +407,7 @@
"@smithy/util-utf8" "^4.0.0"
tslib "^2.6.2"

"@aws-sdk/client-sts@^3.859.0":
"@aws-sdk/client-sts@^3.797.0":
version "3.859.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.859.0.tgz#8830e0db75679f2c67091f64c75d0af59f743421"
integrity sha512-pWZGAmg26/45lrUw3oEzLf+YIHy1C9x3fFyy/mtQe0AtDsJX+7r4OJ7AToZHS/qZbkoUb9AbA5Y/jG4nEhCILw==
Expand Down Expand Up @@ -734,7 +734,7 @@
"@smithy/util-middleware" "^4.0.4"
tslib "^2.6.2"

"@aws-sdk/signature-v4-crt@^3.858.0":
"@aws-sdk/signature-v4-crt@^3.796.0":
version "3.858.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4-crt/-/signature-v4-crt-3.858.0.tgz#86a3533bda82b1bb3092e4c2bad08d205335b661"
integrity sha512-LU5kACHicznf3d/wdmLUUBbv0J53OVAq/A+Vsz340i/1At7mmf2fRpjiVJuCoUAbAh+uEe82qp7N6xXP9Yu4sA==
Expand Down Expand Up @@ -788,7 +788,7 @@
dependencies:
tslib "^2.6.2"

"@aws-sdk/util-dynamodb@^3.859.0":
"@aws-sdk/util-dynamodb@^3.797.0":
version "3.859.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/util-dynamodb/-/util-dynamodb-3.859.0.tgz#a98e2855926570025f19e46a43513701433a4ac6"
integrity sha512-NsV8PoPg0dq3TkAMiFF2J31k+AZa3ibB5ChpffNrboRhlISQyUZiWJV5Pv6lMKDKyo8TkRhxAoQDUr9spNs2cg==
Expand Down Expand Up @@ -849,7 +849,7 @@
"@smithy/types" "^4.3.1"
tslib "^2.6.2"

"@azure/msal-browser@^4.18.0":
"@azure/msal-browser@^4.11.0":
version "4.18.0"
resolved "https://registry.yarnpkg.com/@azure/msal-browser/-/msal-browser-4.18.0.tgz#ea11137669916f6aca67448a424e029417fc99de"
integrity sha512-esQwdtHHVkFJhcKWnysnCTchiKsy3dmNZGs8AckD9PO3t8Lp5VtY0xcrbCBC0JbttG/5w2/xukUQOsMpoUFKrg==
Expand All @@ -861,7 +861,7 @@
resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-15.9.0.tgz#49b62a798dd1b47b410e6e540fd36009f1d4d18e"
integrity sha512-lbz/D+C9ixUG3hiZzBLjU79a0+5ZXCorjel3mwXluisKNH0/rOS/ajm8yi4yI9RP5Uc70CAcs9Ipd0051Oh/kA==

"@azure/msal-node@^3.6.4":
"@azure/msal-node@^3.5.1":
version "3.6.4"
resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-3.6.4.tgz#937f0e37e73d48dfb68ab8f3a503a0cf21a65285"
integrity sha512-jMeut9UQugcmq7aPWWlJKhJIse4DQ594zc/JaP6BIxg55XaX3aM/jcPuIQ4ryHnI4QSf03wUspy/uqAvjWKbOg==
Expand All @@ -870,7 +870,7 @@
jsonwebtoken "^9.0.0"
uuid "^8.3.0"

"@azure/msal-react@^3.0.16":
"@azure/msal-react@^3.0.10":
version "3.0.16"
resolved "https://registry.yarnpkg.com/@azure/msal-react/-/msal-react-3.0.16.tgz#0eee9c22eb4c817690a1af516fc9946876c003f0"
integrity sha512-fIFc3z9UrHoOCG4rApNWMRr83DnQlo+CHfLSPNBQa4rndIkr+XYBpdYDqlzqtmikRf3A+CYNVOQ+lQX6jM0zdw==
Expand Down Expand Up @@ -1410,7 +1410,7 @@
fastify-plugin "^5.0.0"
uid-safe "^2.1.5"

"@fastify/cors@^11.1.0":
"@fastify/cors@^11.0.1":
version "11.1.0"
resolved "https://registry.yarnpkg.com/@fastify/cors/-/cors-11.1.0.tgz#09f79748f08f147d19cfc3f1807b59791bc77cf0"
integrity sha512-sUw8ed8wP2SouWZTIbA7V2OQtMNpLj2W6qJOYhNdcmINTu6gsxVYXjQiM9mdi8UUDlcoDDJ/W2syPo1WB2QjYA==
Expand Down Expand Up @@ -1710,19 +1710,19 @@
dependencies:
"@types/mdx" "^2.0.0"

"@middy/core@^6.4.1":
"@middy/core@^6.1.6":
version "6.4.1"
resolved "https://registry.yarnpkg.com/@middy/core/-/core-6.4.1.tgz#9e8b87e31c6907ca57bc14421e3f51f78b269508"
integrity sha512-NaKLoLUSkoxite0hkw5Tsa3DmuWyhRkZBbhD1tvr7FCWmj+MaQapNEvKMOSVNx/ET4ifY3KnKp0Zm0Q141Xcmg==

"@middy/event-normalizer@^6.4.1":
"@middy/event-normalizer@^6.1.6":
version "6.4.1"
resolved "https://registry.yarnpkg.com/@middy/event-normalizer/-/event-normalizer-6.4.1.tgz#633844fd0d0d7dbe96d77e23863c6ff7ffe772ad"
integrity sha512-EREFMOsFNgaLh88xhwIjg3eVXDP+FKrALZR5qxFLp/8okha15/Vwro6SR5dQJ+XowTDnRlDT9+Wr1xPQVbCNzA==
dependencies:
"@middy/util" "6.4.1"

"@middy/sqs-partial-batch-failure@^6.4.1":
"@middy/sqs-partial-batch-failure@^6.1.6":
version "6.4.1"
resolved "https://registry.yarnpkg.com/@middy/sqs-partial-batch-failure/-/sqs-partial-batch-failure-6.4.1.tgz#b7cdf52a30b83b0cfbe1002a5c7c765c48669c85"
integrity sha512-hl/lYGAGA38TWwEVBufRxwGW9X7YhsXFadkVuPIUurzyAloUE/dp2g/zLFnSk+D2Es7ub7Amhfm4nukKUBcUbQ==
Expand Down Expand Up @@ -2753,7 +2753,7 @@
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-8.6.14.tgz#78c6dc878f705de70c67f2b2d08b8313b985d81a"
integrity sha512-r4y+LsiB37V5hzpQo+BM10PaCsp7YlZ0YcZzQP1OCkPlYXmUAFy2VvDKaFRpD8IeNPKug2u4iFm/laDEbs03dg==

"@tabler/icons-react@^3.34.1":
"@tabler/icons-react@^3.31.0":
version "3.34.1"
resolved "https://registry.yarnpkg.com/@tabler/icons-react/-/icons-react-3.34.1.tgz#852b8efcab5382e44cc0f09b3de7d25ef3cba6f9"
integrity sha512-Ld6g0NqOO05kyyHsfU8h787PdHBm7cFmOycQSIrGp45XcXYDuOK2Bs0VC4T2FWSKZ6bx5g04imfzazf/nqtk1A==
Expand Down Expand Up @@ -3049,12 +3049,12 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==

"@types/react-dom@^19.1.7":
"@types/react-dom@^19.1.2", "@types/react-dom@^19.1.7":
version "19.1.7"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.7.tgz#2863f2aa89e023592b981204ef92c5221b286410"
integrity sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==

"@types/react@^19.1.9":
"@types/react@^19.1.2", "@types/react@^19.1.9":
version "19.1.9"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.9.tgz#f42b24f35474566a39b5c3a98e4d0c425b79a849"
integrity sha512-WmdoynAX8Stew/36uTSVMcLJJ1KRh6L3IZRx1PZ7qJtBqT3dYTgyDTx8H1qoRghErydW7xw9mSJ3wS//tCRpFA==
Expand Down Expand Up @@ -3623,7 +3623,7 @@ anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"

argon2@^0.43.1:
argon2@^0.43.0:
version "0.43.1"
resolved "https://registry.yarnpkg.com/argon2/-/argon2-0.43.1.tgz#8155ae67fd4ca2a7364364ca3e45e0d8fbbc0ee9"
integrity sha512-TfOzvDWUaQPurCT1hOwIeFNkgrAJDpbBGBGWDgzDsm11nNhImc13WhdGdCU6K7brkp8VpeY07oGtSex0Wmhg8w==
Expand Down Expand Up @@ -3848,7 +3848,7 @@ axe-core@^4.10.0:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.3.tgz#04145965ac7894faddbac30861e5d8f11bfd14fc"
integrity sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==

axios@^1.11.0, axios@^1.7.7, axios@^1.9.0:
axios@^1.10.0, axios@^1.7.7, axios@^1.9.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.11.0.tgz#c2ec219e35e414c025b2095e8b8280278478fdb6"
integrity sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==
Expand Down Expand Up @@ -4887,7 +4887,7 @@ esbuild-register@^3.5.0:
dependencies:
debug "^4.3.4"

"esbuild@^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0", esbuild@^0.25.0, esbuild@^0.25.8, esbuild@~0.25.0:
"esbuild@^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0", esbuild@^0.25.0, esbuild@^0.25.3, esbuild@^0.25.8, esbuild@~0.25.0:
version "0.25.8"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.8.tgz#482d42198b427c9c2f3a81b63d7663aecb1dda07"
integrity sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==
Expand Down Expand Up @@ -5425,7 +5425,7 @@ fastify-raw-body@^5.0.0:
raw-body "^3.0.0"
secure-json-parse "^2.4.0"

fastify-zod-openapi@^5.2.0:
fastify-zod-openapi@^5.0.1:
version "5.2.0"
resolved "https://registry.yarnpkg.com/fastify-zod-openapi/-/fastify-zod-openapi-5.2.0.tgz#7029cd0bf67704211d305cf83efc1c1de922b343"
integrity sha512-gTotTHt/XtbXGGCcN4fdIQuyqgdPym2P3YkxGcU9iPnjebpvuFA+JWY2797bPdlwFSTZTNkkkilFf4VfqUgJzA==
Expand Down Expand Up @@ -6124,7 +6124,7 @@ ioredis-mock@^8.9.0:
fengari-interop "^0.1.3"
semver "^7.5.4"

ioredis@^5.7.0:
ioredis@^5.6.1:
version "5.7.0"
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.7.0.tgz#be8f4a09bfb67bfa84ead297ff625973a5dcefc3"
integrity sha512-NUcA93i1lukyXU+riqEyPtSEkyFq8tX90uL659J+qpCZ3rEdViB/APC58oAhIh3+bJln2hzdlZbBZsGNrlsR8g==
Expand Down Expand Up @@ -7609,7 +7609,7 @@ pathval@^2.0.0:
resolved "https://registry.yarnpkg.com/pathval/-/pathval-2.0.1.tgz#8855c5a2899af072d6ac05d11e46045ad0dc605d"
integrity sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==

[email protected], [email protected], pdfjs-dist@^4.6.82, pdfjs-dist@^4.8.69, pdfjs-dist@^5.4.54:
[email protected], [email protected], pdfjs-dist@^4.6.82, pdfjs-dist@^4.8.69, pdfjs-dist@^5.2.133:
version "4.10.38"
resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-4.10.38.tgz#3ee698003790dc266cc8b55c0e662ccb9ae18f53"
integrity sha512-/Y3fcFrXEAsMjJXeL9J8+ZG9U01LbuWaYypvDW2ycW1jL269L3js3DVBjDJ0Up9Np1uqDXsDrRihHANhZOlwdQ==
Expand Down Expand Up @@ -7944,7 +7944,7 @@ react-docgen@^8.0.0:
resolve "^1.22.1"
strip-indent "^4.0.0"

"react-dom@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react-dom@^19.1.1:
"react-dom@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react-dom@^19.1.0:
version "19.1.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.1.1.tgz#2daa9ff7f3ae384aeb30e76d5ee38c046dc89893"
integrity sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==
Expand Down Expand Up @@ -8035,7 +8035,7 @@ react-remove-scroll@^2.6.2:
use-callback-ref "^1.3.3"
use-sidecar "^1.1.3"

react-router-dom@^7.7.1:
react-router-dom@^7.5.2:
version "7.7.1"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.7.1.tgz#456d1053dda5e1c1328a2b6b2359f6a1c47072fc"
integrity sha512-bavdk2BA5r3MYalGKZ01u8PGuDBloQmzpBZVhDLrOOv1N943Wq6dcM9GhB3x8b7AbqPMEezauv4PeGkAJfy7FQ==
Expand Down Expand Up @@ -8077,7 +8077,7 @@ [email protected]:
loose-envify "^1.4.0"
prop-types "^15.6.2"

"react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react@^19.1.1:
"react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react@^19.1.0:
version "19.1.1"
resolved "https://registry.yarnpkg.com/react/-/react-19.1.1.tgz#06d9149ec5e083a67f9a1e39ce97b06a03b644af"
integrity sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==
Expand Down Expand Up @@ -8909,7 +8909,7 @@ strip-literal@^3.0.0:
dependencies:
js-tokens "^9.0.1"

stripe@^18.4.0:
stripe@^18.0.0:
version "18.4.0"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-18.4.0.tgz#1c0d5a7ed168f1ecd0f4a80d1e947e615d3eb841"
integrity sha512-LKFeDnDYo4U/YzNgx2Lc9PT9XgKN0JNF1iQwZxgkS4lOw5NunWCnzyH5RhTlD3clIZnf54h7nyMWkS8VXPmtTQ==
Expand Down Expand Up @@ -9967,7 +9967,7 @@ zod-openapi@^5.1.0:
resolved "https://registry.yarnpkg.com/zod-openapi/-/zod-openapi-5.3.0.tgz#5e14c00b448d07918eb70122d89cf93020eeed50"
integrity sha512-hv3DU37kV39v0MEiQ0vcL06NLS9bTHTb7FNtuFk2zhuATsi+UNcNN6y03z7qbI9NdC6LJS+Knk5shOSCUMwsDQ==

zod-validation-error@^4.0.1:
zod-validation-error@^4.0.0-beta.1, zod-validation-error@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.1.tgz#a105723eb40299578a6a38cb86647068f6d005b1"
integrity sha512-F3rdaCOHs5ViJ5YTz5zzRtfkQdMdIeKudJAoxy7yB/2ZMEHw73lmCAcQw11r7++20MyGl4WV59EVh7A9rNAyog==
Expand Down
Loading