public function logout(ResponseInterface $response, $destination = '/')
    {
        // Make sure we're making request with the authorization_code grant.
        $this->asUser();

        $this->getFrameworkBridge()->logout();

        $destination = $this->getFrameworkBridge()->prepareUrl($destination);
        $ssoLogoutUrl = config('services.northstar.url').'/logout?redirect='.$destination;

        return $response->withStatus(302)->withHeader('Location', $ssoLogoutUrl);
    }