lucia
createKeyId()#
Creates key id (KeySchema.id).
const createKeyId: (providerId: string, providerUserId: string) => string;
Parameters#
| name | type | description |
|---|---|---|
providerId | string | Key provider id |
providerUserId | string | Key provider user id |
Returns#
| type | description |
|---|---|
string | Key id |
DEFAULT_SESSION_COOKIE_NAME#
Default session cookie name.
import { DEFAULT_SESSION_COOKIE_NAME } from "lucia";
const DEFAULT_SESSION_COOKIE_NAME = "auth_session";
lucia()#
Initialize Lucia and create a new Auth instance.
import { lucia } from "lucia";
const lucia: (config: Configuration) => Auth;
Parameters#
| name | type | description |
|---|---|---|
config | Configuration | Lucia configuration |
Returns#
| type |
|---|
Auth |
LuciaError()#
Error class thrown by Lucia. See reference for LuciaError.
import { LuciaError } from "lucia";
Example#
try {
// ...
} catch (e) {
if (e instanceof LuciaError) {
// Lucia error
}
}