The console could only sign in with Google or GitHub, so it could not open before both OAuth apps exist (owner item Y-2). Add email sign-in: Scribase Auth mails a one-time code (POST /otp), the console redeems it (POST /verify), reads the user from the auth server, checks it matches the address, and opens the same session as the OAuth path. Same-origin checks on both posts; inputs validated before any call. RAILYARD_OAUTH_PROVIDERS picks the OAuth buttons (default google,github; empty = email only). 7 new tests, console 154/154, tsc clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
284 B
TypeScript
10 lines
284 B
TypeScript
import { deps } from "../../../../lib/deps.ts";
|
|
import { verifyEmailSignIn } from "../../../../lib/email-signin.ts";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function POST(req: Request) {
|
|
const { cfg, repo } = deps();
|
|
return verifyEmailSignIn(req, { cfg, repo });
|
|
}
|