fix(auth)- Fix Redirect url flow in OidcCallback (#11878)

This commit is contained in:
Meenakshi Kamalaseshan Radha 2024-11-21 01:37:07 +05:30 committed by GitHub
parent 3f267afc97
commit 2a37483b49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,8 +130,6 @@ public class OidcCallbackLogic extends DefaultCallbackLogic {
CallContext ctx = ctxResult.getFirst();
Result result = (Result) ctxResult.getSecond();
setContextRedirectUrl(ctx);
// Handle OIDC authentication errors.
if (OidcResponseErrorHandler.isError(ctx)) {
return OidcResponseErrorHandler.handleError(ctx);
@ -192,6 +190,9 @@ public class OidcCallbackLogic extends DefaultCallbackLogic {
}
}
// Set the redirect url from cookie before creating action
setContextRedirectUrl(ctx);
action = this.redirectToOriginallyRequestedUrl(ctx, defaultUrl);
}
} catch (RuntimeException var20) {