Chamath Silva
Chamath Silva
I came across the same requirement. Especially when using CodeGrantFlow. Therefore I modified the Amazon Cognito Auth source to support to promise. https://www.npmjs.com/package/amazon-cognito-auth-js-promises ( Updated Documentation with promises example )
Yes, you have to do it manually once token expired (after 1 hour ). You can do it via refreshSession() method. `let user = auth.getCachedSession();` `auth.refreshSession(user.getRefreshToken().getToken())`
@tbpolicarpio You are right, it did the same thing and additionally it caches new tokens. (same as parseCognitoWebResponse() method)