HostConfig.auth
property · packages/auth/src/server.ts:203
readonly auth: YieldedAuth<I, S, Api, Actions>The Auth.make(…) application: its routes are mounted, its sessions verified.
Auth / foldkit-auth/server
interface · packages/auth/src/server.ts:194
interface HostConfig<
I,
S extends Sessions.SessionMetadata,
Api extends Auth.SessionApi<S, unknown>,
Actions extends AuthContract.AuthActions,
User,
R,
> {
readonly auth: YieldedAuth<I, S, Api, Actions>
readonly http: Omit<Http.AuthHttpOptions, 'oauth'>
readonly services: Context.Context<I>
readonly principal: (
session: S,
) => Effect.Effect<User, RemoteUnauthenticated, R>
readonly key?: ((user: User) => string) | undefined
}What AuthServer.host takes.
HostConfig.authproperty · packages/auth/src/server.ts:203
readonly auth: YieldedAuth<I, S, Api, Actions>The Auth.make(…) application: its routes are mounted, its sessions verified.
HostConfig.httpproperty · packages/auth/src/server.ts:209
readonly http: Omit<Http.AuthHttpOptions, 'oauth'>The options for Http.make, given to Yielded's routes and to both
resolvers, so the cookie the routes set is the one the resolvers read.
No oauth: its callbacks need services this does not provide.
HostConfig.servicesproperty · packages/auth/src/server.ts:215
readonly services: Context.Context<I>The built Auth service and what it stands on (its store, its hashing),
shared by the routes and the resolvers: build them once per isolate,
as a ManagedRuntime's context(), never per request.
HostConfig.principalproperty · packages/auth/src/server.ts:217
readonly principal: (
session: S,
) => Effect.Effect<User, RemoteUnauthenticated, R>The application's principal for a verified session, read per request; it may refuse it.
HostConfig.keyproperty · packages/auth/src/server.ts:219
readonly key?: ((user: User) => string) | undefinedWho the principal is, for the x-foldkit-subject check and the answer's header; see ResolverConfig.