auth
Documentation / lib/server/auth
auth​
auth: any;
Defined in: apps/web/src/lib/server/auth.ts:39
permissions​
const permissions: object;
Defined in: apps/web/src/lib/server/auth.ts:115
Type declaration​
Name | Type | Defined in |
---|---|---|
| ||
|
initializeUser()​
function initializeUser(locals: any, request: any): Promise<any>;
Defined in: apps/web/src/lib/server/auth.ts:144
Get user object from locals of the request
Parameters​
Parameter | Type |
---|---|
|
|
|
|
Returns​
Promise
<any
>
initAuthRouteHandler()​
function initAuthRouteHandler(__namedParameters: object): Promise<any>;
Defined in: apps/web/src/lib/server/auth.ts:13
Updated route handler that creates auth instance per request
Parameters​
Parameter | Type |
---|---|
| { |
|
|
|
|
Returns​
Promise
<any
>
createAuth()​
function createAuth(env: any): any;
Defined in: apps/web/src/lib/server/auth.ts:41
Factory function to create auth instance with platform env
Parameters​
Parameter | Type |
---|---|
|
|
Returns​
any
initDatabase()​
function initDatabase(__namedParameters: object): Promise<any>;
Defined in: apps/web/src/lib/server/auth.ts:109
Add drizzle DB to locals.db
Parameters​
Parameter | Type |
---|---|
| { |
|
|
|
|
Returns​
Promise
<any
>
checkAuthorization()​
function checkAuthorization(__namedParameters: object): Promise<any>;
Defined in: apps/web/src/lib/server/auth.ts:124
SvelteKit hook for checking user authorization and handling route protection
Parameters​
Parameter | Type |
---|---|
| { |
|
|
|
|
Returns​
Promise
<any
>