From 0fb6b8ab9b0048bed4e613db988595cc8a1a2b60 Mon Sep 17 00:00:00 2001 From: Bretton Date: Tue, 02 Dec 2025 03:24:54 +0000 Subject: [PATCH] fix(oauth): use metadata URL as client_id per atproto spec The atproto OAuth spec requires client_id to be the URL of the client metadata document, not just the domain. Changed from: https://coves.social To: https://coves.social/oauth/client-metadata.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- internal/atproto/oauth/client.go | 4 +++- 1 file(s) changed, 3 insertion(s)(+), 1 deletion(s)(-) diff --git a/internal/atproto/oauth/client.go b/internal/atproto/oauth/client.go --- a/internal/atproto/oauth/client.go +++ b/internal/atproto/oauth/client.go @@ -82,8 +82,10 @@ callbackURL := "http://localhost:3000/oauth/callback" clientConfig = oauth.NewLocalhostConfig(callbackURL, config.Scopes) } else { // Production mode: public OAuth client with HTTPS + // client_id must be the URL of the client metadata document per atproto OAuth spec + clientID := config.PublicURL + "/oauth/client-metadata.json" callbackURL := config.PublicURL + "/oauth/callback" - clientConfig = oauth.NewPublicConfig(config.PublicURL, callbackURL, config.Scopes) + clientConfig = oauth.NewPublicConfig(clientID, callbackURL, config.Scopes) } // Set user agent -- tangled.sh