/** * @file `@skylab-kulubu/inscribed-auth/signin` — signin route handler factory. * * Server-only App Router route handler that auto-submits the user to NextAuth's * provider sign-in flow, skipping the "Sign in with X" confirm page that * NextAuth shows when its sign-in URL is hit with GET. The route returns * a tiny HTML document that fetches the CSRF token and POSTs the sign-in * form via JavaScript - the same dance `next-auth/react`'s `signIn()` * helper does, just done from a server route so the consumer can link to * `/api/signin` from anywhere (server components, plain anchors, server * actions) without bundling client-side helpers. * * Usage (consumer side): * * // app/api/signin/route.js * export { GET } from "@skylab-kulubu/inscribed-auth/signin"; * * Or with explicit provider id / forced callback URL: * * import { createSignInRoute } from "@skylab-kulubu/inscribed-auth/signin"; * export const GET = createSignInRoute({ provider: "keycloak" }); * * The `callbackUrl` query parameter is forwarded to NextAuth so the user * lands back where they came from after signing in. Defaults to "/". * * `