A4: app shell (layout, nav, tokens, error/empty states, /api/health)
Fixes the A4 blocker: /api/dev/complete now establishes the Auth.js session. Root cause was UntrustedHost (trustHost defaulted false in pnpm start / production because setEnvDefaults derives it from AUTH_URL, not NEXTAUTH_URL, and assertConfig checks it before that default applies). Added trustHost: true to the auth config; rebuilt. Complete response now sets authjs.session-token, /schedule returns 200, and all 4 e2e shell tests pass. Also ignores test-results/ artifacts.
This commit is contained in:
@@ -20,9 +20,17 @@ export const GET = async (req: NextRequest) => {
|
||||
);
|
||||
}
|
||||
|
||||
const result = await signIn("magic-link", { token, redirect: false });
|
||||
return new Response(JSON.stringify({ ok: true, url: result.url }), {
|
||||
status: 200,
|
||||
headers: JSON_HEADERS,
|
||||
});
|
||||
};
|
||||
try {
|
||||
const result = await signIn("magic-link", { token, redirect: false });
|
||||
return new Response(JSON.stringify({ ok: true, url: result.url }), {
|
||||
status: 200,
|
||||
headers: JSON_HEADERS,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("[complete] signIn failed:", (err as Error).message, (err as Error).stack);
|
||||
return new Response(JSON.stringify({ error: "failed to sign in" }), {
|
||||
status: 500,
|
||||
headers: JSON_HEADERS,
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user