amazon-cognito-identity-js
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "amazon-cognito-identity-js", | ||
"description": "Amazon Cognito Identity Provider JavaScript SDK", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Amazon Web Services", |
@@ -852,2 +852,26 @@ # Amazon Cognito Identity SDK for JavaScript | ||
**Use case 32.** Handling expiration of the Id Token. | ||
```js | ||
refresh_token = session.getRefreshToken(); // receive session from calling cognitoUser.getSession() | ||
if (AWS.config.credentials.needsRefresh()) { | ||
cognitoUser.refreshSession(refresh_token, (err, session) => { | ||
if(err) { | ||
console.log(err); | ||
} | ||
else { | ||
AWS.config.credentials.params.Logins['cognito-idp.<YOUR-REGION>.amazonaws.com/<YOUR_USER_POOL_ID>'] = session.getIdToken().getJwtToken(); | ||
AWS.config.credentials.refresh((err)=> { | ||
if(err) { | ||
console.log(err); | ||
} | ||
else{ | ||
console.log("TOKEN SUCCESSFULLY UPDATED"); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
``` | ||
## Network Configuration | ||
@@ -854,0 +878,0 @@ The Amazon Cognito Identity JavaScript SDK will make requests to the following endpoints |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 26 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
26168153
1232
58734
1021
2
32