init
Type: init(options: sauthbaseOptions): sauthbase
The init()
method initializes the sauthbase
class instance.
This should only be called once during the lifecycle of your application.
Parameters
Option | Type | Description |
---|---|---|
options | sauthbaseOptions | An object containing `secretKey` and `redirect_url` |
secretKey
is used for encryption, and redirect_url
specifies the destination URL after authentication.
Return Value
Returns the sauthbase
instance.
Example Usage
TypeScript
import { } from "sauthbase";
const = .({
: "your_secret_key_here",
: "https://your.redirect.url",
});
Notes
- It is recommended to call
init
only once. - On subsequent calls, the already-initialized instance will be returned.
Last updated on