-- One-use PKCE grants and revocable, knowledge-only client sessions. No plaintext secrets. CREATE TABLE IF NOT EXISTS eddy_sso_codes ( code_hash text PRIMARY KEY, email text NOT NULL, challenge text NOT NULL, redirect_uri text NOT NULL, expires_at bigint NOT NULL ); CREATE INDEX IF NOT EXISTS eddy_sso_codes_expiry ON eddy_sso_codes (expires_at); CREATE TABLE IF NOT EXISTS eddy_sso_sessions ( token_hash text PRIMARY KEY, email text NOT NULL, expires_at bigint NOT NULL ); CREATE INDEX IF NOT EXISTS eddy_sso_sessions_expiry ON eddy_sso_sessions (expires_at);