Skip to content

Commit

Permalink
[ES-675] Reverted the temporary code. (#714)
Browse files Browse the repository at this point in the history
* [ES-675] Temporary code change for testing L2 flow.

Signed-off-by: GurukiranP <talk2gurukiran@gmail.com>

* [ES-675] Temporary code change for testing L2 flow.

Signed-off-by: GurukiranP <talk2gurukiran@gmail.com>

* [ES-675] Reverted the temporary code.

Signed-off-by: GurukiranP <talk2gurukiran@gmail.com>

---------

Signed-off-by: GurukiranP <talk2gurukiran@gmail.com>
Signed-off-by: Gk <76690271+GurukiranP@users.noreply.github.com>
  • Loading branch information
gk-4VII authored May 23, 2024
1 parent 5a99231 commit 445173d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
43 changes: 20 additions & 23 deletions oidc-ui/src/components/ConsentDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -131,7 +131,7 @@ const ConsentDetails = ({
setClaimsScopes(claimsScopes);
}
} catch (error) {
// redirectOnError("authorization_failed_msg", error.message);
redirectOnError("authorization_failed_msg", error.message);
}
};

Expand All @@ -141,28 +141,25 @@ const ConsentDetails = ({

const handleProceed = async () => {
window.onbeforeunload = null;
window.location.replace(
`${eKYCStepsURL}?state=${state}#id_token`
);
// try {
// const signupRedirectResponse = await authServices.prepareSignupRedirect(
// transactionId,
// window.location.href
// );
// const { response, errors } = signupRedirectResponse;
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);
// }
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 = () => {
Expand Down
1 change: 0 additions & 1 deletion oidc-ui/src/components/Pin.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ export default function Pin({
// response.consentAction
// );


//TODO navigate to specific url based on the response
// navigate(process.env.PUBLIC_URL + "/consent" + params, {
// replace: true,
Expand Down

0 comments on commit 445173d

Please sign in to comment.