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

@veryai/connect

v0.1.1

Published

Embed VeryAI palm sign-in as a QR code in your own page.

Readme

@veryai/connect

Embed VeryAI palm sign-in as a QR code inside your own page. The user scans with the VeryAI app, and you get an OAuth authorization code — without ever navigating away.

npm install @veryai/connect

Or without a bundler:

<script src="https://unpkg.com/@veryai/connect@0/build/index.global.js"></script>

Usage

import { renderQR } from "@veryai/connect";

renderQR({
  container: "#very-login",
  clientId: "very_xxxxxxxxxxxx",
  redirectUri: "https://partner.example/oauth/callback",
  state: stateFromYourServer,
  onSuccess: ({ code, state }) => {
    // Single-use. Send it to your server and exchange it there.
    fetch("/api/very/callback", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ code, state }),
    });
  },
  onStatus: (status) => console.log(status), // waiting → scanned → verifying
  onError: (error) => console.error(error.code, error.message),
});

With the <script> build the same function is on window.VeryConnect.

The two rules that matter

1. redirectUri must be registered, and must be on this page's origin.

Register it in the Developer Portal first — Very matches it as an exact string and rejects anything else. Then note that in the default postmessage mode the authorization code is delivered with that URI's origin as the postMessage target. If your page is served from somewhere else, the browser silently drops the message and sign-in appears to do nothing. This SDK checks at startup and calls onError with origin_mismatch rather than letting you debug silence.

https://partner.example/oauth/callback works for a page on https://partner.example. https://api.partner.example/callback does not.

2. Exchange the code on your server. It buys tokens when combined with your client secret, which must never reach a browser. The code is single-use and expires in 10 minutes.

Options

| Option | Required | Description | | --- | --- | --- | | container | ✅ | Element or CSS selector to mount into | | clientId | ✅ | From the Developer Portal | | redirectUri | ✅ | Registered, and same-origin as this page — see above | | state | ✅ | Generate and verify server-side; returned untouched | | scope | | Defaults to openid | | nonce | | Compare against the nonce claim of the ID token | | codeChallenge / codeChallengeMethod | | PKCE. Keep the verifier on your server | | userId | | Re-verification: confirm it is the same person | | connectOrigin | | Defaults to https://connect.very.org | | selfRedirect | | postmessage (default), iframe, or top | | style | | light (default) or dark | | href | | https URL of a stylesheet applied inside the frame | | lang | | BCP-47 tag; defaults to the visitor's own preference | | onSuccess | | ({ code, state }) => void, fired once | | onStatus | | (status) => void | | onError | | ({ code, message }) => void |

renderQR returns a handle:

const login = renderQR({ ... });
login.reload();   // fresh session, e.g. after `expired`
login.destroy();  // unmount and stop listening

Delivery modes

postmessage is the default and the only one that keeps a single-page app on the same page.

iframe navigates the frame to your redirectUri — your callback page renders inside it. Useful if you would rather not run this SDK at all.

top navigates the whole tab. Browsers block top-level navigation from a cross-origin frame without user activation, and the gesture that completes this flow happens on the user's phone, so treat it as best-effort; it falls back to the iframe behaviour.

Statuses

| Status | Meaning | | --- | --- | | waiting | QR is on screen, not yet scanned | | scanned | App picked up the session; user is doing the palm scan | | verifying | Scan finished, exchanging for a code | | expired | Session timed out — the frame offers a refresh | | failed | Verification failed or was cancelled |

Errors

| Code | Meaning | | --- | --- | | origin_mismatch | redirectUri is not on this page's origin (see rule 1) | | invalid_request | Unknown clientId, or redirectUri is not registered for it | | session_expired | The 10-minute window elapsed | | verification_failed | The palm scan did not succeed | | undeliverable | Very holds a code but cannot determine where to send it |

On mobile

A QR is useless on the device that would scan it, so on phones the frame renders an "Open in VeryAI App" deep link instead and attempts to launch the app directly.

License

Apache-2.0