The Logto JavaScript Client SDK written in TypeScript. Check out our docs for more information.
npm install @logto/client
yarn add @logto/client
pnpm add @logto/client
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.
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.