authFromEnvfunction
import { authFromEnv } from '@mortar-kit/auth'
function authFromEnv<User = EmailUser>(options?: AuthFromEnvOptions<User>): Auth<User>createAuth set up from the environment: the secret, who may sign in,
Google when its client is configured, and email sign-in through Resend
(or your mailer). Throws at startup when production is missing a
secret, an admin list or every sign-in method. MORTAR_ADMINS may always
sign in, as well as whoever a given authorize accepts (asked first).
Parameters
options?: AuthFromEnvOptions<User>
Returns
Auth<User>
Example
// src/server/auth.ts
export const auth = authFromEnv({ store: createJsonFileStore({ dir: '.data' }), siteName: 'My site' });