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

@logto/client

v3.2.2

Published

[![Version](https://img.shields.io/npm/v/@logto/client)](https://www.npmjs.com/package/@logto/client) [![Build Status](https://github.com/logto-io/js/actions/workflows/main.yml/badge.svg)](https://github.com/logto-io/js/actions/workflows/main.yml) [![Code

Readme

Logto Client SDK

Version Build Status Codecov

The Logto JavaScript Client SDK written in TypeScript.

Installation

Using npm

npm install @logto/client

Using yarn

yarn add @logto/client

Using pnpm

pnpm add @logto/client

What is this and how does it work?

Logto JavaScript Client SDK is platformless, and is the foundation of the other platform's SDKs (Browser, Next.js, React, Vue, etc.). Usually you are not expected to use it directly in your application, as we have released a set of official SDKs to help you integrate Logto with your favorite JavaScript frameworks. Check this out and get started!

If Logto does not support your framework and you want to contribute by building a new SDK, we recommend checking out our Browser SDK and Node.js SDK and start from there.

Adapters

To implement a platform-specific SDK, you should implement the following adapters:

  1. storage: save tokens and other info.
  2. navigate: handle redirect.
  3. generateState: generate state.
  4. generateCodeVerifier: generate code verifier.
  5. generateCodeChallenge: generate code challenge.
  6. cache: optionally cache well-known data.

The client uses the runtime's native fetch by default. Set the optional fetch adapter only when the platform needs a custom transport.

The optional cache adapter stores well-known data. Cache reads and writes are best-effort and do not make an otherwise successful request fail. The deprecated unstable_cache property remains supported; cache takes precedence when both are provided.

See the adapters for more information.

Request timeouts

Set requestTimeoutMs in LogtoConfig to apply a timeout to each request to the Logto server. The option covers discovery, authorization-code and refresh-token exchange, revocation, user info, and remote JSON Web Key Set requests. Framework SDKs built on @logto/client inherit the same option.

const config = {
  endpoint: 'https://example.logto.app',
  appId: 'your-app-id',
  requestTimeoutMs: 10_000,
};

The timeout is opt-in. The client builds its requester on top of native fetch, or the adapter's custom fetch transport when provided, so the same timeout policy applies in both cases. A custom transport must observe RequestInit.signal and settle after the signal is aborted. The client awaits that settlement before it rejects the operation.

The deprecated requester adapter remains supported for compatibility. When both fetch and requester are provided, fetch takes precedence. Since a custom requester is already fully configured, the client does not apply requestTimeoutMs to it.

Resources

Website Docs Discord