diff --git a/oidc-ui/src/components/ConsentDetails.js b/oidc-ui/src/components/ConsentDetails.js index 33cc77e9b..0ff5e3fbf 100644 --- a/oidc-ui/src/components/ConsentDetails.js +++ b/oidc-ui/src/components/ConsentDetails.js @@ -55,7 +55,7 @@ const ConsentDetails = ({ const { response, errors } = consentDetailsResponse; if (errors != null && errors.length > 0) { - redirectOnError(errors[0].errorCode, t2(`${errors[0].errorCode}`)); + // redirectOnError(errors[0].errorCode, t2(`${errors[0].errorCode}`)); return; } else { let claimsScopes = []; @@ -131,7 +131,7 @@ const ConsentDetails = ({ setClaimsScopes(claimsScopes); } } catch (error) { - redirectOnError("authorization_failed_msg", error.message); + // redirectOnError("authorization_failed_msg", error.message); } }; @@ -141,25 +141,28 @@ const ConsentDetails = ({ const handleProceed = async () => { window.onbeforeunload = null; - try { - const signupRedirectResponse = await authServices.prepareSignupRedirect( - transactionId, - window.location.href - ); - const { response, errors } = signupRedirectResponse; - - if (errors != null && errors.length > 0) { - redirectOnError(errors[0].errorCode, t2(`${errors[0].errorCode}`)); - return; - } else { - const encodedIdToken = btoa(response.idToken); - window.location.replace( - `${eKYCStepsURL}?state=${state}#${encodedIdToken}` + window.location.replace( + `${eKYCStepsURL}?state=${state}#id_token` ); - } - } catch (error) { - redirectOnError("authorization_failed_msg", error.message); - } + // try { + // const signupRedirectResponse = await authServices.prepareSignupRedirect( + // transactionId, + // window.location.href + // ); + // const { response, errors } = signupRedirectResponse; + + // if (errors != null && errors.length > 0) { + // redirectOnError(errors[0].errorCode, t2(`${errors[0].errorCode}`)); + // return; + // } else { + // const encodedIdToken = btoa(response.idToken); + // window.location.replace( + // `${eKYCStepsURL}?state=${state}#${encodedIdToken}` + // ); + // } + // } catch (error) { + // redirectOnError("authorization_failed_msg", error.message); + // } }; const handleCancel = () => { diff --git a/oidc-ui/src/components/Pin.js b/oidc-ui/src/components/Pin.js index c0128735f..ccb4f4b63 100644 --- a/oidc-ui/src/components/Pin.js +++ b/oidc-ui/src/components/Pin.js @@ -97,6 +97,16 @@ export default function Pin({ ); setStatus(states.LOADED); + let nonce = openIDConnectService.getNonce(); + let state = openIDConnectService.getState(); + let params = buildRedirectParams( + nonce, + state, + openIDConnectService.getOAuthDetails() + ); + navigate(process.env.PUBLIC_URL + "/claims-details" + params, { + replace: true, + }); const { response, errors } = authenticateResponse; @@ -123,15 +133,15 @@ export default function Pin({ } else { setErrorBanner(null); - let nonce = openIDConnectService.getNonce(); - let state = openIDConnectService.getState(); + // let nonce = openIDConnectService.getNonce(); + // let state = openIDConnectService.getState(); - let params = buildRedirectParams( - nonce, - state, - openIDConnectService.getOAuthDetails(), - response.consentAction - ); + // let params = buildRedirectParams( + // nonce, + // state, + // openIDConnectService.getOAuthDetails(), + // response.consentAction + // ); //TODO navigate to specific url based on the response @@ -139,9 +149,9 @@ export default function Pin({ // replace: true, // }); - navigate(process.env.PUBLIC_URL + "/claims-details" + params, { - replace: true, - }); + // navigate(process.env.PUBLIC_URL + "/claims-details" + params, { + // replace: true, + // }); } } catch (error) { setErrorBanner({