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 🙏

© 2026 – Pkg Stats / Ryan Hefner

icetea-id-client

v1.1.1

Published

Readme

Icetea Id Client

Install

npm install icetea-id-client --save

Usage

import { IceteaId } from 'icetea-id-client';

const iceteaId = new IceteaId('SECRET_KEY'); 

API

Oauth

login({provider: string, redirectUri: string})

Login with oauth2

<ButtonGoogle
    className="alreadyAcc"
    fullWidth
    onClick={() => iceteaId.oauth.login({
    provider: 'google', //for now just support only google, will update later
    redirectUri: redirectUrl
    })}
>
    Continue with Google
</ButtonGoogle>
=

Crypto

generateKey()

Generate random 256bit encryption key

 const encryptionKey = iceteaId.crypto.generateKey();
encrypt(text: string, encryptionKey: string)

Encrypt a plain text with encryption key given

const encryptedPrivateKey = iceteaId.crypto.encrypt(privateKey, encryptionKey);
decrypt(cipherText: string, encryptionKey: string)

Decrypt a secret key to plain text with encryption key given

const decryptedPrivateKey = iceteaId.crypto.decrypt(privateKey, decryptedEncryptionKey)

AWS

exchangeSessionCredential(bearerToken: string)

Exchange token get from iceteaId.oauth.login to get session credential to access kms

const token = localStorage.getItem('credentials');
const cognitoCredentials = await iceteaId.aws.exchangeSessionCredential(token)
encrypt(credentials: CognitoIdentity.Types.GetCredentialsForIdentityResponse, plainText: string)

Encrypt a plain text with AWS KMS

const encryptedEncryptionKey = await iceteaId.aws.encrypt(cognitoCredentials, encryptionKey);
decrypt(credentials: CognitoIdentity.Types.GetCredentialsForIdentityResponse, cipherText: KMS.Types.CiphertextType)

Decrypt a secret text with AWS KMS

const token = localStorage.getItem('credentials');
const cognitoCredentials = await iceteaId.aws.exchangeSessionCredential(token)
const decryptedEncryptionKey = await iceteaId.aws.decrypt(
cognitoCredentials, response.data.encryptionKey
)

User

getMetadata()

Return a current authenticate user (email, displayname,...)

const user = await iceteaId.users.getMetadata();
saveKey(privateKey: string, encryptionKey: string)

Save key to IceteaId after authenticate

const saveKey = await iceteaId.users.saveKey(encryptedPrivateKey, encryptedEncryptionKey)
sendOtp(channel: string, emailOrPhone: string)

Send Otp to retrive encrypted privatekey and encrypted encryption key

const response = await iceteaId.users.sendOtp('sms', phoneNumber); //for now just use sms for better performance
verifyOtp(channel: string, emailOrPhone: string)

Verify Otp to retrive encrypted privatekey and encrypted encryption key

  const response = await iceteaId.users.verifyOtp(otp, phoneNumber, 'sms');
  console.log(response.data.privateKey) //encrytped private key
  console.log(response.data.encryptionKey) // encrypted encryption key