@cntr/sveltekit v0.3.0
Logto JS (Core) SDK
The Logto JavaScript Core SDK written in TypeScript. Check out our docs for more information.
We also provide 文档 in Simplified Chinese.
Installation
Using npm
npm install @logto/browser
Using yarn
yarn add @logto/browser
Using pnpm
pnpm add @logto/browser
What is this and how does it work?
As the name suggests, Logto browser SDK is the foundation of all Logto SDKs that run in a browser environment (Vanilla, React, Vue, etc.). @logto/browser
extends @logto/client
and provides a browser specific implementation of the client adapters:
- Implements
Storage
by using browserlocalStorage
andsessionStorage
. - Implements
navigate
method by usingwindow.location.href
.
Usually you are not expected to use it directly in your application, but instead choosing a framework specific SDK that built on top of it. We have already released a set of official SDKs to accelerate your integration. Check this out and get started!
If Logto does not support your front-end framework and you want to create your own SDK from scratch, we recommend checking out the SDK specification first. You can also refer to our React SDK and Vue SDK to learn more about the implementation details.