We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Seems like an old method.
My Code:
$sso = new \WorkOS\SSO(); $profile = $sso->getProfile($token);
Error:
"message": "Call to undefined method WorkOS\\Resource\\Profile::json()", "exception": "Error", "file": "/var/www/vendor/workos/workos-php/lib/SSO.php", "line": 153,
Your code:
/** * Verify that SSO has been completed successfully and retrieve the identity of the user. * * @param string $accessToken, the token used to authenticate the API call * * @throws Exception\GenericException * * @return \WorkOS\Resource\Profile */ public function getProfile($accessToken) { $getProfilePath = "sso/profile"; $params = [ "access_token" => $accessToken ]; $method = Client::METHOD_GET; $url = "https://api.workos.com/sso/profile"; $requestHeaders = ["Authorization: Bearer " . $accessToken]; list($result) = Client::requestClient()->request( $method, $url, $requestHeaders, null ); $decodedResponse = json_decode($result, true); $profile = Resource\Profile::constructFromResponse($decodedResponse); return $profile->json(); }
I'm on the latest version. If you cannot see why, please let me know.
Also, why do you have these that are not used anywhere.
$getProfilePath = "sso/profile"; $params = [ "access_token" => $accessToken ];
Are you using code generator? :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Seems like an old method.
My Code:
Error:
Your code:
I'm on the latest version. If you cannot see why, please let me know.
Also, why do you have these that are not used anywhere.
Are you using code generator? :)
The text was updated successfully, but these errors were encountered: