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

@jaxlabs/myid-react

v1.1.0

Published

MyID Login-Button für React-Apps (JaxLabs)

Downloads

123

Readme

@jaxlabs/myid-react

Login-Button für Apps im JaxLabs-Netzwerk. Design, Texte und Localization kommen zentral aus MyID (apps.design_config), nicht aus der App.

npm i @jaxlabs/myid-react

Alternativ: Download-Button auf der Integrations-Seite im MyID-Admin (fertig kompiliertes .tar.gz, falls kein Zugriff auf die npm-Registry besteht).

Veröffentlicht wird automatisch per GitHub Actions (.github/workflows/publish-sdk.yml), sobald sich die Version in sdk/package.json ändert und auf main landet - einfach hochzählen und pushen, dann kommt das Update bei allen Apps per npm update an.

Frontend

import { MyIdLoginButton } from '@jaxlabs/myid-react';

<MyIdLoginButton
  appId="credify"
  onSuccess={({ token, user }) => {
    // Token ans eigene Backend schicken
    fetch('/api/session', { method: 'POST', body: JSON.stringify({ token }) });
  }}
/>;

Ablauf: Der Button lädt beim Mount GET /api/v1/apps/<appId>/design und rendert sich damit. Ein Klick öffnet myid.feuchte.org/auth?appId=<appId>; das Popup prüft das Session-Cookie, holt ein Access-Token und schickt es per postMessage an das Parent-Window (Ziel-Origin ist die in MyID hinterlegte origin_url der App).

Backend

Client-Secret steht im MyID-Admin unter der App (Detailansicht) und gehört in die Umgebungsvariablen der App - niemals ins Frontend.

import { verifyMyIdToken, fetchMyIdUserInfo } from '@jaxlabs/myid-react/src/verify.js';

const claims = await verifyMyIdToken(token, 'credify', process.env.MYID_CLIENT_SECRET!);
if (!claims) throw new Error('unauthorized');
// claims.risk_score: 0-100, regelbasiert - z. B. um Trials für auffällige Accounts einzuschränken

const info = await fetchMyIdUserInfo(token, 'credify', process.env.MYID_CLIENT_SECRET!);
// info.profile enthält nur die vom Nutzer freigegebenen Felder

Das Token ist ein HS256-JWT (iss: myid, aud: <slug>, 1 Stunde gültig). Ein gesperrter Nutzer fällt bei verify und userinfo sofort auf 403 - auch mit noch gültigem Token.

claims.risk_score fasst Indizien für Mehrfach-Accounts zusammen (z. B. E-Mail-Alias mit + oder mehrere Accounts vom selben Gerät). Es kommt nur die Zahl - nie Daten zu anderen Konten, dafür bleibt die Detailansicht im MyID-Admin.

Scopes

Verfügbar: email, username, full_name, phone, address, bio, avatar. Im MyID-Admin legst du je App fest, welche davon Pflicht sind (ohne Einwilligung kein Login) und welche optional (der Nutzer gibt sie im Popup einzeln frei). Nicht freigegebene Felder liefert userinfo gar nicht erst aus. avatar kommt als Data-URL (Base64 JPEG, ~256px) oder null.

userinfo liefert zusätzlich newsletter_opt_in (boolean) - ob der Nutzer den Newsletter dieser App möchte. Hat die App Newsletter als Pflicht markiert (im MyID-Admin je App einstellbar), ist das Feld immer true.

Die Integrations-Seite im MyID-Admin (Apps → App auswählen → Integration) erzeugt für jede App live einen kompletten Prompt mit genau dieser Konfiguration - zum Kopieren in einen KI-Agenten oder als Doku fürs eigene Team.

design_config (Beispiel)

{
  "primary": "#111827",
  "textColor": "#ffffff",
  "logoUrl": "https://credify.feuchte.org/logo.svg",
  "label": "Mit MyID anmelden",
  "locale": "de",
  "radius": "8px"
}