diff --git a/app/Domain/Auth/Controllers/LogoutController.php b/app/Domain/Auth/Controllers/LogoutController.php index 99c3426c6..26459c560 100644 --- a/app/Domain/Auth/Controllers/LogoutController.php +++ b/app/Domain/Auth/Controllers/LogoutController.php @@ -18,6 +18,8 @@ private function getLogoutLink(): string /** @var Auth0 $auth0 */ $auth0 = app(Auth0::class); + $idtoken = $auth0->getIdToken(); + if (Auth::check()) { $auth0->logout(); Auth::guard(config('nova.guard'))->logout(); @@ -32,7 +34,7 @@ private function getLogoutLink(): string config(KeycloakConfig::KEYCLOAK_REALM_NAME), config(KeycloakConfig::KEYCLOAK_CLIENT_ID), $url, - $auth0->getIdToken() + $idtoken ); } diff --git a/app/Nova/Resources/KeycloakClient.php b/app/Nova/Resources/KeycloakClient.php index 8e739c421..90b618767 100644 --- a/app/Nova/Resources/KeycloakClient.php +++ b/app/Nova/Resources/KeycloakClient.php @@ -86,7 +86,7 @@ public function fields(NovaRequest $request): array Text::make('Open', function (KeycloakClientModel $model) { $client = $model->toDomain(); $realm = App::get(Realms::class)->getRealmByEnvironment($client->environment); - $url = $realm->baseUrl . 'admin/master/console/#/' . $realm->internalName . '/clients/' . $client->id->toString() . '/settings'; + $url = $realm->baseUrl . 'dashboard/' . $realm->internalName . '/clients/' . urlencode($client->clientId) . '/settings'; return sprintf('Open in Keycloak', $url); })->asHtml(),