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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dwn-protocol/identifi-react

v1.0.12

Published

`IdentifiReact` is a React component that integrates with the Identifi service, enabling user identification and verification in your React applications with minimal setup. <br/><br/>

Readme

IdentifiReact

IdentifiReact is a React component that integrates with the Identifi service, enabling user identification and verification in your React applications with minimal setup.

🚀 Features

  • Easy integration with the Identifi platform
  • Customizable configuration options
  • Callback hooks for success and error handling
  • Supports TypeScript

📦 Installation

Install the package and its peer dependencies via npm:

npm install @dwn-protocol/identifi-react framer-motion

Peer Dependencies:

  • framer-motion (^12.0.0) - Required for animations
  • lucide-react (^0.510.0) - Required for icons
  • react (^18.0.0) - Required
  • react-dom (^18.0.0) - Required

🛠️ Usage

import React from 'react';
import { IdentifiReact } from "identifi-react";
import "identifi-react/index.css"; // import "identifi-react/index.css" for the UI styling.

const App = () => {
  return (
    <IdentifiReact
      title="Identifi"
      appConfig={{
        pbUrl: import.meta.env.VITE_IDENTIFI_URL,
        userId: "your platforms users id"
      }}
      onError={(error) => {
        console.error("Identifi error:", error);
      }}
      onSuccess={(result) => {
        console.log("Identifi success:", result);
      }}
    />
  );
};

export default App;

⚙️ Props

| Prop | Type | Required | Description | | ----------- | ---------- | -------- | --------------------------------------- | | title | string | ✅ | Title displayed in the component | | appConfig | object | ✅ | Configuration object for Identifi API | | onError | function | ✅ | Callback for error handling | | onSuccess | function | ✅ | Callback when the process is successful |

appConfig object

| Key | Type | Required | Description | | -------- | -------- | -------- | ----------------------------------------------------- | | pbUrl | string | ✅ | URL of the Identifi API endpoint | | userId | string | ✅ | Your platforms user id | | apiKey | string | ❌ | Deprecated - authentication now uses OIDC access token |

🧪 Example Response

On success, the onSuccess callback receives a result object. On failure, the onError callback is triggered with an error object.

🔧 Environment Variables

Make sure you define your environment variables in a .env file:

VITE_IDENTIFI_URL="your-api-url"
VITE_DWN_API_USER="dev1"
VITE_DWN_API_PASSWORD="password1"

🔐 Authentication

The SDK now uses DWN API credentials (username/password) for authentication instead of hardcoded API keys. The credentials are read from environment variables and used to authenticate with the relay app's /login endpoint to obtain a JWT token.

The authentication flow:

  1. SDK reads VITE_DWN_API_USER and VITE_DWN_API_PASSWORD from environment variables
  2. Authenticates with ${pbUrl}/login endpoint using username/password
  3. Receives a JWT token (valid for 30 days)
  4. Token is cached in memory and localStorage for subsequent API calls
  5. Token is automatically refreshed when expired

Make sure to set the DWN API credentials in your .env file before using the IdentifiReact component.

🛠 Development

  1. Clone the repo.
  2. Run npm install.
  3. Start development:
npm run dev

📄 License

MIT License