aws-mobile-appsync-sdk-js
aws-mobile-appsync-sdk-js copied to clipboard
`auth` option of `createAuthLink` of `aws-appsync-auth-link` cache the `jwtToken`?
considering this piece of code.
const url = 'xxx'
const jwtToken = async () => {
return await getJwtToken()
}
const auth = {
type: 'AMAZON_COGNITO_USER_POOLS',
jwtToken,
}
const userPoolsAuthLink = createAuthLink({ url, region, auth })
the jwtToken is a function, which should be called for every request, but seems like the package aws-appsync-auth-link only called it once at the first time. This will cause problem when the jwtToken expired.
Any updates on this?