method
RiduAuth.login
Start a session. With a token store the token is persisted before this resolves.
Arguments
| Argument | Type | Description |
|---|---|---|
credentials | LoginInput< | Email and password; collection is optional when the client sets auth.collection. |
options | RequestOptions | | Request options such as an AbortSignal. |
Returns
The declared result.
Promise<SessionFor<Config, Slug>>Full signature
RiduAuth.login<Slug extends AuthCollectionSlug<Config> = SessionCollection<Config, DefaultAuth>>(
credentials: LoginInput<DefaultAuth, Slug>,
options?: RequestOptions,
): Promise<SessionFor<Config, Slug>>Related types
AuthCollectionSlugCollection slugs with the generated auth capability.
SessionCollectionAuth collections a client's sessions can belong to: its default, or every auth collection.
LoginInputCredentials for
auth.login.RequestOptionsOptions shared by every request.
SessionForOne authenticated session narrowed to the auth collection that owns it. With several auth collections this is a union discriminated by
collection.