Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@aws-sdk/credential-provider-cognito-identity
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-cognito-identity/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provid
The @aws-sdk/credential-provider-cognito-identity package is part of the AWS SDK for JavaScript v3. It provides a way to retrieve AWS credentials and manage identity for applications using Amazon Cognito. This package is specifically designed to integrate with Amazon Cognito Identity Pools, allowing developers to authenticate users and grant them access to various AWS services.
Retrieve AWS Credentials
This feature allows developers to retrieve AWS credentials for authenticated or unauthenticated users from an Amazon Cognito Identity Pool. The credentials can then be used to access other AWS services.
import { fromCognitoIdentityPool } from '@aws-sdk/credential-provider-cognito-identity';
const credentials = fromCognitoIdentityPool({
clientConfig: { region: 'us-west-2' },
identityPoolId: 'us-west-2:12345678-1234-1234-1234-123456789012'
});
Customize Credential Behavior
Developers can specify a custom role ARN to define which IAM role the credentials should assume when accessing AWS services. This is useful for fine-grained control over permissions.
import { fromCognitoIdentityPool } from '@aws-sdk/credential-provider-cognito-identity';
const credentials = fromCognitoIdentityPool({
clientConfig: { region: 'us-west-2' },
identityPoolId: 'us-west-2:12345678-1234-1234-1234-123456789012',
customRoleArn: 'arn:aws:iam::123456789012:role/MyCustomRole'
});
This package provides authentication functionality for Amazon Cognito. It is similar to @aws-sdk/credential-provider-cognito-identity but focuses more broadly on user authentication rather than just credential provisioning. It supports features like user registration, authentication, and account recovery.
AWS Amplify is a comprehensive development framework that includes support for Cognito Identity. While it provides similar functionalities for handling credentials and identities, it is more extensive, offering features for building complete applications including UI components, API interactions, and more.
An internal package
You probably shouldn't, at least directly. Please use @aws-sdk/credential-providers instead.
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-cognito-identity/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provid
The npm package @aws-sdk/credential-provider-cognito-identity receives a total of 4,941,795 weekly downloads. As such, @aws-sdk/credential-provider-cognito-identity popularity was classified as popular.
We found that @aws-sdk/credential-provider-cognito-identity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.