User login using API we get AccessToken, RefreshToken and IdToken.
AccessToken works only for 1 hour set on the App Client period.
Based on RefreshToken we can get a new AccessToken & RefreshToken. But when I run “initiateAuth” API for REFRESH_TOKEN_AUTH service I am getting “Invalid Refresh Token.” error.
https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html
I used API documentation for user login and refresh token.
I’m work on php SDK
Same refresh token working for revokeToken API but generate new access token we face error.
Do you know how we can solve this error?
Other all api working SignUp, Login, ForgotPassword, confirmForgotPassword, revokeToken
My concern is only user sign in long time for front end user no need every time login.
I have already follow the documentation & pass the required parameter
$result = $client->initiateAuth([
'AuthFlow'followed => 'REFRESH_TOKEN_AUTH',
'ClientId' => $clientID,
'UserPoolId' => $UserPoolId,
'AuthParameters' => [
'REFRESH_TOKEN' => $refreshToken,
'SECRET_HASH' => $secret_hash,
],
]);
Dipak PHP is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.