Skip to content

Commit

Permalink
fix(auth)- Fix Redirect url flow in OidcCallback (#11878)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkamalas authored Nov 20, 2024
1 parent 3f267af commit 2a37483
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datahub-frontend/app/auth/sso/oidc/OidcCallbackLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ public Object perform(
CallContext ctx = ctxResult.getFirst();
Result result = (Result) ctxResult.getSecond();

setContextRedirectUrl(ctx);

// Handle OIDC authentication errors.
if (OidcResponseErrorHandler.isError(ctx)) {
return OidcResponseErrorHandler.handleError(ctx);
Expand Down Expand Up @@ -192,6 +190,9 @@ private Pair<CallContext, Object> superPerform(
}
}

// Set the redirect url from cookie before creating action
setContextRedirectUrl(ctx);

action = this.redirectToOriginallyRequestedUrl(ctx, defaultUrl);
}
} catch (RuntimeException var20) {
Expand Down

0 comments on commit 2a37483

Please sign in to comment.