Installation
This section explains how to manually integrate the SAuthBase SDK into an existing project.
System Requirements
- Node.js 18 or later
- macOS, Windows (including WSL), or Linux
Installing the Package
The SAuthBase SDK can be installed using the following command:
terminal
npm install sauthbase
Basic Setup
In a TypeScript project, import and initialize it as shown below:
TypeScript
import { } from "sauthbase";
.({
: "your_64char_hex_key_here",
: "http://localhost:3000/auth",
});
A 64-character hexadecimal string is recommended for secretKey
. It should be sufficiently long and complex for security purposes.
The SAuthBase SDK also provides a secure key generator:
TypeScript
.(.())
Automatic Installation
There is currently no automatic setup CLI for the SAuthBase SDK. It is planned for a future update.
Last updated on