Skip to content

Commit

Permalink
Merge pull request #1223 from cultuurnet/PPF-450/login-with-keycloak-2
Browse files Browse the repository at this point in the history
PPF-450 Fix logout for keycloak
  • Loading branch information
grubolsch authored Jun 25, 2024
2 parents e181652 + 22908e6 commit eb1dbe5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/Domain/Auth/Controllers/LogoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ private function getLogoutLink(): string
Auth::guard(config('nova.guard'))->logout();
}

if (env('AUTHENTICATION_MODE') === 'keycloak') {
return sprintf(
'https://%s/realms/%s/protocol/openid-connect/logout?client_id=%s&post_logout_redirect_uri=%s',
env('AUTH0_LOGIN_MANAGEMENT_DOMAIN'),
env('KEYCLOAK_LOGIN_REALM_NAME'),
env('AUTH0_LOGIN_CLIENT_ID'),
env('APP_URL')
);
}

return $auth0->authentication()->getLogoutLink(config('app.url'));
}

Expand Down

0 comments on commit eb1dbe5

Please sign in to comment.