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
Hello, I am testing Chatwork Oauth2 with my app. It was successfully granted by user:
However, on next logins, Chatwork still asks user to grant permissions:
Example code: cw-login.php
<?php require __DIR__ . '/vendor/autoload.php'; use ChatWork\OAuth2\Client\ChatWorkProvider; $provider = new ChatWorkProvider( getenv('CW_CLIENT_ID'), getenv('CW_CLIENT_SECRET'), getenv('CW_REDIRECT_URI') ); $url = $provider->getAuthorizationUrl([ 'scope' => [ 'users.profile.me:read', 'rooms.all:read_write', ], ]); echo "<a href='$url'>Login with chatwork</a>";
cw-login-callback.php
<?php require __DIR__ . '/vendor/autoload.php'; use ChatWork\OAuth2\Client\ChatWorkProvider; use GuzzleHttp\Client; use League\OAuth2\Client\Grant\AuthorizationCode; use League\OAuth2\Client\Grant\RefreshToken; if (!empty($_GET['error'])) { die('User denied your app requests!'); } if (empty($_GET['code'])) { die('Error: no code returned!'); } $provider = new ChatWorkProvider( getenv('CW_CLIENT_ID'), getenv('CW_CLIENT_SECRET'), getenv('CW_REDIRECT_URI') ); $accessToken = $provider->getAccessToken((string) new AuthorizationCode(), [ 'code' => $_GET['code'], ]); echo 'access_token: ' . $accessToken->getToken() . PHP_EOL; $resourceOwner = $provider->getResourceOwner($accessToken); echo 'Resource owner: '; print_r($resourceOwner->toArray());
I think, this issue is not related to this oauth2 client package, but I don't know where to get help. Please give some advices. Thank you!
The text was updated successfully, but these errors were encountered:
Merge pull request #1 from arai-ta/fix-token-endpoint-authorization
71d02f0
Fix token endpoint authorization
No branches or pull requests
Hello,
I am testing Chatwork Oauth2 with my app. It was successfully granted by user:
However, on next logins, Chatwork still asks user to grant permissions:
Example code:
cw-login.php
cw-login-callback.php
I think, this issue is not related to this oauth2 client package, but I don't know where to get help.
Please give some advices. Thank you!
The text was updated successfully, but these errors were encountered: