AuthHost.routes
property · packages/auth/src/server.ts:235
readonly routes: (request: Request) => Promise<Response>Yielded's routes (sign up, sign in, sign out): the handler for its paths, /auth/… by default.
Auth / foldkit-auth/server
interface · packages/auth/src/server.ts:233
interface AuthHost<User, R> {
readonly routes: (request: Request) => Promise<Response>
readonly scripted: {
readonly resolvePrincipal: ScriptedResolver<User, R>
readonly headers:
| ((principal: Option.Option<User>) => Readonly<Record<string, string>>)
| undefined
}
readonly navigation: {
readonly resolvePrincipal: NavigationResolver<User, R>
}
readonly dispose: () => Promise<void>
}What AuthServer.host returns.
AuthHost.routesproperty · packages/auth/src/server.ts:235
readonly routes: (request: Request) => Promise<Response>Yielded's routes (sign up, sign in, sign out): the handler for its paths, /auth/… by default.
AuthHost.scriptedproperty · packages/auth/src/server.ts:240
readonly scripted: {
readonly resolvePrincipal: ScriptedResolver<User, R>
readonly headers:
| ((principal: Option.Option<User>) => Readonly<Record<string, string>>)
| undefined
}For serveFetch: serveFetch({ server, layer, ...host.scripted }). With
key, headers says whom each answer was for (AuthServer.answered).
AuthHost.navigationproperty · packages/auth/src/server.ts:247
readonly navigation: {
readonly resolvePrincipal: NavigationResolver<User, R>
}For pageReader: pageReader({ server, layer, ...host.navigation }).
AuthHost.disposeproperty · packages/auth/src/server.ts:249
readonly dispose: () => Promise<void>Closes the routes' runtime; services stays the caller's.