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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zuplo/react-api-key-manager

v2.5.0

Published

A React component to manage API keys

Downloads

124

Readme

Overview

A react component for managing API keys that is compatible with any API Key management API.

Component Screenshot

To see a demo of the component visit https://api-key-manager.com.

Try it out by following our detailed walkthrough tutorial.

Getting Started

This component can be used with any React framework. It is compatible with TailwindCSS, but Tailwind is not required.

Install

Install the component in your React project

npm install @zuplo/react-api-key-manager

With Tailwind

Import the component's stylesheet into your global.css or equivalent file. The styles will use your project's tailwind configuration to provide a consistent theme.

@tailwind base;
@tailwind components;
@tailwind utilities;
@import "@zuplo/react-api-key-manager/tailwind.css";

Without Tailwind

Import the component's stylesheet into your root component (i.e. App.jsx), typically below your other stylesheets.

import "./styles/globals.css";
import "@zuplo/react-api-key-manager/index.css";

Custom Styles

The the component's css can be completely customized by copying either the tailwind.css or index.css files from node_modules/@zuplo/react-api-key-manager/dist/ and modifying the styles to suite your needs.

Usage

You can import the ReactAPIKeyManager into your React project directly.

import {
  ApiKeyManager,
  DefaultApiKeyManagerProvider,
} from "@zuplo/react-api-key-manager";

const MyComponent = () => {
  const defaultProvider = new DefaultApiKeyManagerProvider(
    "<BASE_URL>",
    "<ACCESS_TOKEN>",
  );

  return <ApiKeyManager provider={defaultProvider} />;
};

Backend API

The API Key Manager component interacts with an API that allows authorized users to manage their own keys. The easiest way to get started is to use the Auth Translation API sample and deploy it to Zuplo. By default this sample connects the Zuplo API Key Management Service, but you could adapt the sample to use other services or data storage systems.

Custom Provider

If you don't want to build an API that conforms to the built-in provider, you can implement a custom ApiKeyManagerProvider in your client to use an existing or custom API. The Interface for the provider is shown below. Additionally, you can see the default implementation in packages/react/src/default-provider.ts

Community and Contribution

We welcome community contributions and ideas. Please feel free to open an issue or propose a pull request. Join us on Discord if you have questions, feedback, or just want to hang out.

License

MIT License

Copyright © 2023 Zuplo, Inc. All rights reserved.