diff --git a/oidc-ui/src/components/LoginQRCode.js b/oidc-ui/src/components/LoginQRCode.js index 1be573bc6..5cccb670f 100644 --- a/oidc-ui/src/components/LoginQRCode.js +++ b/oidc-ui/src/components/LoginQRCode.js @@ -36,7 +36,8 @@ export default function LoginQRCode({ const [error, setError] = useState(null); const [qrCodeTimeOut, setQrCodeTimeout] = useState(); const [errorBanner, setErrorBanner] = useState(null); - + const [qrRedirectUrl, setQrRedirectUrl] = useState(""); + const linkedTransactionExpireInSec = openIDConnectService.getEsignetConfiguration( configurationKeys.linkedTransactionExpireInSecs @@ -79,6 +80,8 @@ export default function LoginQRCode({ response.expireDateTime ); + setQrRedirectUrl(text); + const canvas = document.createElement("canvas"); QRCode.toCanvas( canvas, @@ -436,6 +439,11 @@ export default function LoginQRCode({ setErrorBanner(null); }; + const handleQRCode = () => { + window.onbeforeunload = null; + window.location.href = qrRedirectUrl; + }; + return ( <>
@@ -475,8 +483,8 @@ export default function LoginQRCode({ )} {qr && (
-
- +
+ wallet-qr-code
)}