-
-
Notifications
You must be signed in to change notification settings - Fork 248
Closed
Milestone
Description
I receive 400 error when I use method getAccessToken() of class \yii\authclient\BaseOAuth, and no refresh_token is present for the token.
What steps will reproduce the problem?
- Set
$autoRefreshAccessTokentotruefor\yii\authclient\clients\Oauth2Client - Authenticate client with a token that does not contain
refresh_token
/** * @var \yii\authclient\clients\Oauth2Client $client */ $client->authenticateClient(); - Wait for token to expire
- Use getAccessToken method to get access token
/** * @var \yii\authclient\clients\Oauth2Client $client */ $client->getAccessToken(); - I receive 400 error from
refreshAccessTokenmethod, becauserefresh_tokenwas not present in the token
What's expected?
Request is not sent out when refresh_tokenis not present and the old token is returned instead.
What do you get instead?
I receive 400 Refresh Token cannot be blank.
Additional info
| Q | A |
|---|---|
| Yii version | 2.0.52 |
| Yii Auth Client version | 2.2.16 |
| Yii HTTP Client version | 2.0.16 |
| PHP version | 7.4 |
| Operating system | Linux (Manjaro) |
Metadata
Metadata
Assignees
Labels
No labels