Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-cognito-identity

Package Overview
Dependencies
Maintainers
5
Versions
426
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-cognito-identity

AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native

  • 3.696.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is @aws-sdk/client-cognito-identity?

The @aws-sdk/client-cognito-identity package is part of the AWS SDK for JavaScript (v3) and provides a client for accessing the Amazon Cognito Identity service. This service enables you to create unique identities for your users and authenticate them with identity providers. With this package, developers can integrate their applications with the Cognito Identity service to manage user identities, authentication, and access control.

What are @aws-sdk/client-cognito-identity's main functionalities?

Creating a new identity pool

This feature allows developers to create a new identity pool. An identity pool is a store of user identity data specific to your account. The code sample demonstrates how to create an identity pool using the CognitoIdentityClient.

const { CognitoIdentityClient, CreateIdentityPoolCommand } = require('@aws-sdk/client-cognito-identity');

const client = new CognitoIdentityClient({ region: 'us-east-1' });
const command = new CreateIdentityPoolCommand({
  IdentityPoolName: 'MyIdentityPool',
  AllowUnauthenticatedIdentities: false
});

const response = await client.send(command);
console.log(response);

Retrieving identity pool roles

This feature enables the retrieval of roles associated with a specific identity pool. The code sample shows how to use the CognitoIdentityClient to fetch the roles for an identity pool.

const { CognitoIdentityClient, GetIdentityPoolRolesCommand } = require('@aws-sdk/client-cognito-identity');

const client = new CognitoIdentityClient({ region: 'us-east-1' });
const command = new GetIdentityPoolRolesCommand({
  IdentityPoolId: 'us-east-1:12345678-1234-1234-1234-123456789012'
});

const response = await client.send(command);
console.log(response);

Listing identities

This feature allows for listing the identities within an identity pool. The code sample demonstrates how to list identities in an identity pool, with a maximum number of results specified.

const { CognitoIdentityClient, ListIdentitiesCommand } = require('@aws-sdk/client-cognito-identity');

const client = new CognitoIdentityClient({ region: 'us-east-1' });
const command = new ListIdentitiesCommand({
  IdentityPoolId: 'us-east-1:12345678-1234-1234-1234-123456789012',
  MaxResults: 10
});

const response = await client.send(command);
console.log(response);

Other packages similar to @aws-sdk/client-cognito-identity

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc