Skip to content

Commit

Permalink
[ES-1375] Update Consent.js
Browse files Browse the repository at this point in the history
Signed-off-by: Gk <[email protected]>
  • Loading branch information
gk-4VII authored Aug 23, 2024
1 parent dedd9df commit 5c0abe0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions oidc-ui/src/pages/Consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Base64 from "crypto-js/enc-base64";

export default function ConsentPage() {
const [searchParams, setSearchParams] = useSearchParams();
const [isRedirect, setRedirect] = useState(false);

const location = useLocation();

let decodeOAuth = Buffer.from(location.hash ?? "", "base64")?.toString();
Expand Down Expand Up @@ -94,8 +94,6 @@ export default function ConsentPage() {
oAuthDetailsHash
);

setRedirect(true);

if (!errors.length) {
// Set the authenticationTime parameter
urlInfoParams.set(
Expand All @@ -118,7 +116,7 @@ export default function ConsentPage() {
resume(hash);
}
}
}, [key, urlInfo, hasResumed, isRedirect]);
}, [key, urlInfo, hasResumed]);

let parsedOauth = null;
try {
Expand All @@ -137,7 +135,7 @@ export default function ConsentPage() {
const oidcService = new openIDConnectService(parsedOauth, nonce, state);

return (
isRedirect && (
state && (
<Consent
backgroundImgPath="images/illustration_one.png"
authService={new authService(oidcService)}
Expand Down

0 comments on commit 5c0abe0

Please sign in to comment.