Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Details
# Put output below this line
{
"@aws-amplify/auth": "^6.17.0",
"aws-amplify": "^6.15.8",
aws-appsync: ^4.1.9
}
Describe the bug
When using CUSTOM_WITHOUT_SRP authentication, the ID token expires after one hour and Amplify Auth (fetchAuthSession) does not automatically refresh it.
session.tokens.refreshToken appears undefined, even though Cognito app client is configured to issue refresh tokens.
Expected behavior
Amplify should refresh the ID token automatically using the refresh token (if available), or at least expose a clear error when refresh is impossible.
Reproduction steps
Configure Cognito user pool with a custom auth flow (CUSTOM_WITHOUT_SRP)
Sign in using signIn() and confirmSignIn() with an OTP
Call fetchAuthSession() → token is valid
Wait >1 hour and call again → returns expired ID token or triggers unauthenticated error
Code Snippet
// Put your code below this line.
Log output
Details
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Details
Describe the bug
When using CUSTOM_WITHOUT_SRP authentication, the ID token expires after one hour and Amplify Auth (fetchAuthSession) does not automatically refresh it.
session.tokens.refreshToken appears undefined, even though Cognito app client is configured to issue refresh tokens.
Expected behavior
Amplify should refresh the ID token automatically using the refresh token (if available), or at least expose a clear error when refresh is impossible.
Reproduction steps
Configure Cognito user pool with a custom auth flow (CUSTOM_WITHOUT_SRP)
Sign in using signIn() and confirmSignIn() with an OTP
Call fetchAuthSession() → token is valid
Wait >1 hour and call again → returns expired ID token or triggers unauthenticated error
Code Snippet
// Put your code below this line.Log output
Details
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response