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

Oauth refresh token problems. #333

Closed
Fearofthedark66 opened this issue Oct 4, 2023 · 3 comments
Closed

Oauth refresh token problems. #333

Fearofthedark66 opened this issue Oct 4, 2023 · 3 comments

Comments

@Fearofthedark66
Copy link

Hi,

I am having trouble to refresh my tokens and I must be missing something here. With the code below I am getting a : ### Required parameter not passed: "refresh_token" error.

 $provider = new \League\OAuth2\Client\Provider\GenericProvider([
      'clientId'                => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX',   
      'clientSecret'            => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
      'urlAuthorize'            => 'https://login.xero.com/identity/connect/authorize',
      'urlAccessToken'          => 'https://identity.xero.com/connect/token',
      'urlResourceOwnerDetails' => 'https://identity.xero.com/resources'
    ]);
```

    $refreshToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX';

   
    $newAccessToken = $provider->getAccessToken('authorizaton_code', [
      'refresh_token' =>  $refreshToken,
      'grant_type' => 'authorization_code'
    ]);
`

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

PETOSS-354

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Thanks for raising an issue, a ticket has been created to track your request

@Fearofthedark66
Copy link
Author

Never mind, there was a typo from my side :)

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

1 participant