function
createServerClient
Create the Ridu client for one SvelteKit request. It authenticates with the request's frontend cookie, verifies auth.getSession() at most once, and writes the cookie on the response after a server-side login, logout, or rejected token.
Arguments
| Argument | Type | Description |
|---|---|---|
ridu | Binding< | The ridu value. |
event | Pick< | The event value. |
options | ServerClientOptions | The options value. |
Returns
The declared result.
RiduClient<Config, Slug>Full signature
function createServerClient<
Config extends RiduConfigShape,
Slug extends AuthCollectionSlug<Config>,
>(
ridu: Binding<Config, Slug>,
event: Pick<
RequestEvent,
"cookies" | "url",
> & Partial<Pick<RequestEvent, "fetch">>,
options?: ServerClientOptions,
): RiduClient<Config, Slug>Related types
ServerClientOptionsPublic interface ServerClientOptions from @riducms/sveltekit.