type
SessionFor
One authenticated session narrowed to the auth collection that owns it. With several auth collections this is a union discriminated by collection.
Full signature
type SessionFor<
Config extends RiduConfigShape,
Slug extends AuthCollectionSlug<Config> = AuthCollectionSlug<Config>,
> =
Slug extends unknown
? {
/** Non-secret session ID used for device management; never a credential. */
id: string;
collection: Slug;
user: OutputFor<Config, Slug>;
/** Absolute RFC 3339 expiry. Rotation never extends it. */
expiresAt: string;
}
: neverRelated types
AuthCollectionSlugCollection slugs with the generated auth capability.