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

@lockally/react-native

v0.1.0

Published

Official Lockally SDK for React Native — transactional email, contacts, and agent inboxes. Secure-by-default auth (backend-minted tokens + OAuth PKCE) over the typed `lockally` client.

Readme

Lockally for React Native

Official React Native SDK for the Lockally API. It wraps the typed lockally client with secure-by-default auth (backend-minted tokens + OAuth 2.1 PKCE), automatic retries, idempotency keys, and cursor pagination.

Install

npm install @lockally/react-native
# Recommended companions for the OAuth/secure-storage helpers (Expo):
npx expo install expo-auth-session expo-secure-store expo-crypto

If you use PKCE directly (not via expo-auth-session), also import a secure RNG polyfill once at your app entry:

import "react-native-get-random-values";

🔐 Security: never ship a live API key

A React Native bundle is distributed to devices — anything in it, including a lk_live_… key, can be extracted. A leaked send-scoped key is an open spam relay billed to you.

  • Sending mail (OTP, verification) + contact syncBackendTokenProvider. Keep the lk_live_ key on your server; hand the app short-lived, scoped tokens.
  • A signed-in user reading their own mailOAuthPKCEProvider.
  • StaticTokenProvider is for server-side/internal use only (warns on lk_live_).

Quick start

import { SendApi } from "lockally";
import { createClient, BackendTokenProvider } from "@lockally/react-native";

const cfg = createClient({
  tokenProvider: BackendTokenProvider.fromEndpoint(
    "https://api.yourapp.com/lockally/token",
    { method: "POST", headers: { Authorization: `Bearer ${userSession}` } }
  ),
});
const send = new SendApi(cfg);

Cookbook

OTP email / user verification

Trigger from the app, but the token comes from your backend (scoped to messages:send). A stable Idempotency-Key is attached automatically, so a retry never double-sends the code:

await send.v1SendPost({
  v1SendPostRequest: {
    from: "[email protected]",
    to: [email],
    templateId: "otp-code",
    variables: { code: otp, ttl: "10" },
  },
});

Contact syncing

import { ContactsApi } from "lockally";
import { collect } from "@lockally/react-native";

const contacts = new ContactsApi(cfg);
const all = await collect((cursor) =>
  contacts.v1ContactsGet({ cursor }).then((r) => ({ items: r.data ?? [], nextCursor: r.nextCursor }))
);

Push + email workflows

Register the device's push token with your backend; it decides per event whether to push, email (via Lockally), or both. The SDK drives the email leg.

Inbox / agent (OAuth PKCE, with Expo)

import * as AuthSession from "expo-auth-session";
import * as SecureStore from "expo-secure-store";
import { OAuthPKCEProvider, SecureTokenStore } from "@lockally/react-native";

const redirectUri = AuthSession.makeRedirectUri({ scheme: "yourapp" });
const oauth = new OAuthPKCEProvider(
  { clientId: "your-client-id", redirectUri },
  new SecureTokenStore(SecureStore)
);

// expo-auth-session generates PKCE and runs the browser; then:
await oauth.exchange(result.params.code, request.codeVerifier);
const cfg = createClient({ tokenProvider: oauth });

Errors

Non-2xx responses can be mapped to LockallyApiError (status / code / message / requestId) for structured handling and support logging.

License

MIT — see LICENSE.