interface

Ridu

One application's Ridu binding. It holds configuration, never an authenticated client.

Properties

PropertyTypeDescription
baseURLstringThe baseURL value.
authCollectionSlugThe authCollection value.
cookieNamestringThe cookieName value.
provide(options?: ProvideOptions<SessionFor<Config, Slug>>) => RiduClient<Config, Slug>Create the client for this mounted application and share it with descendants. Call it once, during initialization of the root layout. Server renders get an isolated, credential-free client whose auth.session is the rendered snapshot.
use() => RiduClient<Config, Slug>Read the client provided by the root layout. Call it during component initialization.
__@definitionKey@1895RiduDefinition<Config, Slug>The __@definitionKey@1895 value.

Full signature

interface Ridu<Config extends RiduConfigShape, Slug extends AuthCollectionSlug<Config>> { ... }

Source packages/sveltekit/src/lib/index.ts:33

Methods

  • Ridu.provide()

    Create the client for this mounted application and share it with descendants. Call it once, during initialization of the root layout. Server renders get an isolated, credential-free client whose auth.session is the rendered snapshot.

  • Ridu.use()

    Read the client provided by the root layout. Call it during component initialization.