Deploy Foundry Core from main with Actions credentials #8

Merged
Zayden-Jung merged 32 commits from main into codex/foundry-core-bootstrap 2026-11-05 18:57:58 +00:00
Showing only changes of commit 9d5ab9e215 - Show all commits
+2 -2
View File
@@ -284,13 +284,13 @@ func (s *service) exchange(w http.ResponseWriter, r *http.Request, project strin
}
session := token()
result, err := s.db.ExecContext(r.Context(), `
WITH grant AS (
WITH redeemed_grant AS (
DELETE FROM login_grants
WHERE token_hash = $1 AND project = $2 AND frontend_challenge = $3 AND expires_at > now()
RETURNING account_id
)
INSERT INTO project_sessions
SELECT $4, $2, account_id, now() + interval '8 hours' FROM grant
SELECT $4, $2, account_id, now() + interval '8 hours' FROM redeemed_grant
`, digest(code), project, digest(verifier), digest(session))
if err != nil {
return err