@slash-copilot/browser
v2.3.0
Published
[![Version](https://img.shields.io/npm/v/@slash-copilot/browser)](https://www.npmjs.com/package/@slash-copilot/browser) [![Build Status](https://github.com/logto-io/js/actions/workflows/main.yml/badge.svg)](https://github.com/logto-io/js/actions/workflows
Downloads
16
Readme
Logto JS Browser SDK
The Logto JavaScript Browser SDK written in TypeScript. Check out our docs for more information.
Installation
Using npm
npm install @slash-copilot/browser
Using yarn
yarn add @slash-copilot/browser
Using pnpm
pnpm add @slash-copilot/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.). @slash-copilot/browser
extends @slash-copilot/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.