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

@alliumcloud/avatar-sso

v2.3.2

Published

Browser SDK for Avatar SSO Service, handling authentication, user profile, and resource management.

Downloads

1,772

Readme

Odyssey SSO SDK

The Odyssey SSO SDK provides an easy way to integrate Single Sign-On (SSO) functionality, user profile management, and resource management in your browser-based applications.


Installation

npm install @alliumcloud/avatar-sso

Usage

import SSO from "@alliumcloud/avatar-sso";

const sso = new SSO({
  sdkKey: process.env.NEXT_PUBLIC_SDK_KEY,
  debug: true,
});

// Login
sso.login("https://your-app.com/redirect");

// Exchange token from URL and get profile (put it in the root component so that it has access to the url all the time)
const user = await sso.exchange();

// Fetch user profile
const profile = await sso.fetchProfile();

// Refresh token
const tokens = await sso.refresh();

// Logout
await sso.logout("https://your-app.com/redirect");

// Listen to SDK events
sso.onEvents((event) => {
  console.log("SSO Event:", event);
});

SDK Configuration

| Field | Type | Description | | -------- | ------- | ---------------------------- | | sdkKey | string | Your SSO SDK key | | debug | boolean | Enable debug logs (optional) |


Public Methods

Auth

  • localLogin(email: string, password: string)
  • localRegister(email: string, password: string, username: string)
  • localLogout()
  • login(redirectUrl: string)
  • exchange()
  • fetchProfile()
  • refresh()
  • logout(redirectUrl: string)

Profile

  • profileUpdate(payload: UpdateProfilePayload)
  • avatarUpdate(file: File)

Cloth

  • clothGetAll(options?: GetClothsOptions)
  • clothGetById(clothId: string)

Material

  • materialGetAll(options?: GetMaterialsOptions)
  • materialGetById(materialId: string)

Skull

  • skullGetAll()
  • skullGetById(skullId: string)

Skull Material

  • skullMaterialGetAll()
  • skullMaterialGetById(id: string)

Body

  • bodyGetAll()
  • bodyGetById(id: string)

Events

onEvents(cb: Cb) subscribes to SDK events.

Event types:

  • login — user logged in
  • logout — user logged out
  • refresh — token refreshed
  • profile.fetch — profile fetched
  • profile.update — profile updated
  • profile-photo.update — avatar updated
  • cloth.add — cloth added
  • cloth.fetch-all — all cloths fetched
  • cloth.fetch — single cloth fetched
  • cloth.update — cloth updated
  • cloth.delete — cloth deleted
  • material.add — material added
  • material.fetch-all — all materials fetched
  • material.fetch — single material fetched
  • material.update — material updated
  • material.delete — material deleted
  • skull.add — skull added
  • skull.update — skull updated
  • skull.fetch-all — all skulls fetched
  • skull.fetch — single skull fetched
  • skull.delete — skull deleted
  • skull-material.add — skull material added
  • skull-material.fetch-all — all skull materials fetched
  • skull-material.fetch — single skull material fetched
  • skull-material.update — skull material updated
  • skull-material.delete — skull material deleted
  • body.add — body added
  • body.fetch-all — all bodies fetched
  • body.fetch — single body fetched
  • body.update — body updated
  • body.delete — body deleted

Notes

  • This SDK is browser-only. All methods check for the browser environment.
  • Uses a local database (IndexedDB) to store tokens and user profile for session persistence.
  • Automatically handles token refresh for API requests.