Skip to content

Commit

Permalink
fix(frontend): Fix"Logout with OIDC not working" (#8773)
Browse files Browse the repository at this point in the history
  • Loading branch information
FirKys authored Sep 3, 2023
1 parent 1b79142 commit d308986
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datahub-frontend/app/controllers/CentralLogoutController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/
@Slf4j
public class CentralLogoutController extends LogoutController {
private static final String DEFAULT_BASE_URL_PATH = "/login";
private static final String AUTH_URL_CONFIG_PATH = "/login";
private static final String DEFAULT_BASE_URL_PATH = "/";
private static Boolean _isOidcEnabled = false;

@Inject
Expand All @@ -36,8 +37,7 @@ public CentralLogoutController(Config config) {
public Result executeLogout(Http.Request request) {
if (_isOidcEnabled) {
try {
return Results.redirect(DEFAULT_BASE_URL_PATH)
.removingFromSession(request);
return logout(request).toCompletableFuture().get().withNewSession();
} catch (Exception e) {
log.error("Caught exception while attempting to perform SSO logout! It's likely that SSO integration is mis-configured.", e);
return redirect(
Expand All @@ -47,7 +47,7 @@ public Result executeLogout(Http.Request request) {
.withNewSession();
}
}
return Results.redirect(DEFAULT_BASE_URL_PATH)
return Results.redirect(AUTH_URL_CONFIG_PATH)
.withNewSession();
}
}

0 comments on commit d308986

Please sign in to comment.