Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES-675] Reverted the temporary code. #714

Merged
merged 4 commits into from
May 23, 2024
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
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
Loading