mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 21:48:57 +01:00
Loki's GitHub sign-in, and the repo and workflow grant "Start a new
project" acts with, waited on the bitbaum sign-in getting provider
credentials. AccountKit 0.22 brings a product's own GitHub app across at
its existing callback: GitHub is offered again on this runtime, with
githubScopes repo and workflow; a signed-in person pressing GitHub links
it ("Connect GitHub"); a new link's token goes to Loki's accounts, where
the GitHub features read it. GitHub links made under Auth.js are recorded
in AccountKit's table (the import, and migration 0133 on the switched
box), so they sign the same person in. The deploy's provider check
expects GitHub when the box has the app.
Also: prove's real-inbox step retries mail.tm when several proofs run at
once.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
11 lines
697 B
SQL
11 lines
697 B
SQL
-- GitHub signs people in on AccountKit through Loki's own GitHub app
|
|
-- (AccountKit 0.22, src/lib/auth/shared/runtime.ts). A person who linked
|
|
-- GitHub under Auth.js must arrive as themselves, so their link is recorded
|
|
-- in AccountKit's table as the import now does (scripts/db/accountkit-import.sql).
|
|
-- Only where AccountKit holds the person: before a switch this copies nothing.
|
|
INSERT INTO auth_accounts (id, account_id, provider_id, user_id, created_at, updated_at)
|
|
SELECT 'loki-github:' || a.provider_account_id, a.provider_account_id, 'github', a.user_id::text, now(), now()
|
|
FROM accounts a JOIN auth_users u ON u.id = a.user_id::text
|
|
WHERE a.provider = 'github'
|
|
ON CONFLICT DO NOTHING;
|