@logto/client
v2.8.1
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
Downloads
34,189
Readme
Logto Client SDK
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:
- requester: send http requests.
- storage: save tokens and other info.
- navigate: handle redirect.
- generateState: generate state.
- generateCodeVerifier: generate code verifier.
- generateCodeChallenge: generate code challenge.
See the adapters.ts for more information.