method

RiduAuth.login

Start a session. With a token store the token is persisted before this resolves.

Arguments

ArgumentTypeDescription
credentialsLoginInput<DefaultAuth, Slug>Email and password; collection is optional when the client sets auth.collection.
optionsRequestOptions | undefinedRequest 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>>

Source packages/sdk/src/types.ts:1557

Related types

  • AuthCollectionSlug

    Collection slugs with the generated auth capability.

  • SessionCollection

    Auth collections a client's sessions can belong to: its default, or every auth collection.

  • LoginInput

    Credentials for auth.login.

  • RequestOptions

    Options shared by every request.

  • SessionFor

    One authenticated session narrowed to the auth collection that owns it. With several auth collections this is a union discriminated by collection.