Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout problem #37

Open
TomaszPekalski opened this issue Jun 9, 2021 · 2 comments
Open

Logout problem #37

TomaszPekalski opened this issue Jun 9, 2021 · 2 comments

Comments

@TomaszPekalski
Copy link

TomaszPekalski commented Jun 9, 2021

hey, could You help me with logout option.

$client = $this->clientRegistry->getClient('keycloak');
  $logoutUrl = $client->getOAuth2Provider()->getLogoutUrl();
  $response = $client->getOAuth2Provider()->getRequest('GET',$logoutUrl );

when i click logoutUrl on browser i can logout - but from application not

@rds3006
Copy link

rds3006 commented Aug 1, 2023

We are also facing the same issue. The logout is not working as expected and even after calling logout, it is not logging out from Keycloak and thus posing an issue.
@TomaszPekalski did you get any solution for it ?

@RanierePrates
Copy link

I had this issue; basically, it was more of an understanding problem. I forgot to include an array in the getLogoutUrl with the access_token, and the provider's getRequest doesn't make the request; it just instantiates the GuzzleHttp\Psr7\Request.

    $logoutUrl = $provider->getLogoutUrl([
        'access_token' => $token,
    ]);

    try {
        $client = new \GuzzleHttp\Client();
        $request = $client->send(
            $provider->getRequest('GET', $logoutUrl)
        );
    } catch (Exception $e) {
        exit($e->getMessage());
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants