API Reference

k.auth

Type the auth map against your routes and identities, beside the routes instead of inline.

k.auth(routes, map) returns the map typed against the routes and identities, for when you'd rather define it beside the routes than inline in k.contract:

export const auth = k.auth(routes, {
    users: false,
    members: 'user',
});

export const contract = k.contract({
    routes,
    auth,
});