AuthMethodinterface
import { AuthMethod } from '@mortar-kit/auth'
interface AuthMethodA way to sign in. createAuth routes POST <basePath>/<id> to start
and <basePath>/<id>/callback (GET or POST) to callback.
Properties
id: stringURL segment and
Identity.method: lowercase letters, digits and dashes.label: stringButton text on the sign-in page.
input: "button" | "email"What the sign-in page shows for it; see
AuthMethodInfo.input.start: (request: Request, ctx: AuthMethodContext) => Promise<Response>The sign-in form was submitted: redirect to the provider, send an email, …
callback: (request: Request, ctx: AuthMethodContext) => Promise<Response | AuthSuccess>The provider (or an emailed link or code) came back: who is it? A Response instead answers the request as it is (e.g.
ctx.fail).