Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@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.
3.614.0 (2024-07-10)
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,583,223 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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.