You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

aws-cognito-public-keys

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-cognito-public-keys

Gets public keys for a given AWS Cognito user pool id

1.0.0-Beta1
beta
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Build Status npm version

aws-cognito-public-keys

Module for retrieving public keys for AWS Cognito user pools

Features

  • Does not require AWS credentials
  • Synchronous and asynchronous methods
  • Node.js 12.x compatible, works in AWS Lambda environments

Installation

Install via npm.

npm install aws-cognito-public-keys --save

Getting Started

const { getKeysSync } = require( 'aws-cognito-public-keys' );

const userPoolId = 'us-east-1_ZLPZ8Z7yS'; // your user pool id

const awsRegion = 'us-east1';             // valid AWS Region

const key = getKeysSync( userPoolId, awsRegion );

// keys =
// {
//    "<key id 1>": { ...key1 ... }
//    "<key id 2>": { ...key2 ... }
//    ..
// }

API

async getKeys( userPoolId, region )

Gets the Cognito public keys asynchronously. Returns a promise that resolves to an object that contains the keys.

getKeysSync( userPoolId, region )

Gets the Cognito public keys synchronously and blocks until resolved. Returns an object that contains the keys.

Feedback

We'd love to get feedback on how to make this tool better. Feel free to contact us at feedback@vandium.io

License

BSD-3-Clause

Keywords

AWS

FAQs

Package last updated on 22 Jan 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.