npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sungly/cognito-cli

v1.4.0

Published

CLI for all Cognito user life cycle management

Downloads

55

Readme

cognito-cli

CLI for Cognito user life cycle management and basic user authentication to retrieve JWTs (access token, id token and refresh token).

cognito-cli is a wrapper around aws-sdk and is intended to make user management easier instead of having to write a script for one time user management during local development.

Requirements

  • AWS credentials

    When interacting with Amazon Cognito, it is a requirement to have aws credentials. There are a few methods available to you for getting these credentials. Read here.

    Once you have obtained aws access id and aws access secret, save them to ~/.aws/credentials:

    [default]
    aws_access_key_id=
    aws_secret_access_key=
  • Enable USER_PASSWORD_AUTH on the app client

    General > App client > show details > Enable username password based authentication (ALLOW_USER_PASSWORD_AUTH)

Install

Install globally in order to call cognito-cli from anywhere:

npm install -g @sungly/cognito-cli

Add the following to ~/.cognito/config:

user_pool_id=
client_id=
client_secret=
region=ca-central-1
requiredAttributeList=["email", "given_name", "family_name"]

The requiredAttributeList is used for user registration. Make sure to include attributes that are required for your user pool.

Usage

cognito-cli <command>

Available Commands:
init                        # initializing the CLI

login                       # retrieve access, id and refresh token via USER_PASSWORD_AUTH against a specified user pool in the config.

srp-login                   # retrieve acesss, id and refresh token via SRP authentication.

create-user                 # create a user profile using the `requiredAttributeList`

confirm-user                # confirm user registration with a confirmation code

resend-confirmation-user    # resend the confirmation code

forgot-password             # trigger the forgot password flow

### admin calls - Note these calls require additional IAM privileges

set-user-password           # set user with a new password

get-user-profile            # get the user profile from cognito

verify-user-email           # verify user email in order to get emails

disable-user                # disable user from logging in

enable-user                 # allow user to login

batch-delete-users          # delete all users from a user pool
Other commands
decode-token                # decode JSON web tokens

cognito-cli version         # get the cli version

cognito-cli help            # get help instruction

License

MIT