Use :
aws-sdk-php v3.163.3
PHP 7.4.8
I set refresh token expiration for 3650 days.
When I want to call refresh token, why result from refresh token for ExpiresIn : 86400 ?
$response = $this->client->adminInitiateAuth([
'AuthFlow' => 'REFRESH_TOKEN_AUTH',
'AuthParameters' => [
'REFRESH_TOKEN' => $refreshToken,
'SECRET_HASH' => $this->cognitoSecretHash($username),
],
'ClientId' => $this->client_id,
'UserPoolId' => $this->user_pool_id,
]);
The
ExpiresIn
you see in the response has nothing to do with the refresh token. The refresh token is still valid for 3650 days from the moment it was first issued. The 86400 seconds you see is only for theIdToken
and theAccessToken
.