Skip to content

Latest commit

 

History

History
 
 

client

Logto Client SDK

Version Build Status Codecov

The Logto JavaScript Client SDK written in TypeScript. Check out our docs for more information.

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. requester: send http requests.
  2. storage: save tokens and other info.
  3. navigate: handle redirect.
  4. generateState: generate state.
  5. generateCodeVerifier: generate code verifier.
  6. generateCodeChallenge: generate code challenge.

See the adapters.ts for more information.

Resources

Website Docs Discord