I am using AWS Cognito for authentication in my iOS app (Swift). I noticed that the token used for authentication is the one from the initial login of the app session. However, after I kill the app and reopen it, the token updates to a new one.
The token should be updated immediately after login, without needing to restart the app.
When a user logs in, Cognito uses the initial session token.
If the app is killed and reopened, Cognito fetches a new token.
This causes issues where the app uses an outdated token until it is restarted.