Skip to content

Fix browser CORS for Space authentication - #130

Merged
haileyok merged 2 commits into
mainfrom
hailey/spaces-dpop-nonce
Aug 25, 2026
Merged

Fix browser CORS for Space authentication#130
haileyok merged 2 commits into
mainfrom
hailey/spaces-dpop-nonce

Conversation

@haileyok

Copy link
Copy Markdown
Owner

Summary

  • Fix browser CORS responses so Space/OAuth clients can send Authorization and DPoP headers during credential exchange.
  • Keep Cocoon’s intentionally open cross-origin policy while making credentialed browser requests standards-compliant.

Changes

  • Reflect the requesting origin instead of combining * with credentials.
  • Explicitly allow Authorization, DPoP, content negotiation, atproto-proxy, and standard HTTP methods.
  • Expose DPoP-Nonce and WWW-Authenticate for browser DPoP retry handling.
  • Add a regression test covering the Space credential-exchange preflight.

Validation

  • go test ./... -count=1
  • go vet ./...
  • go test -race ./... -count=1
  • git diff --check

Review notes

  • This is a follow-up to merged PR Accept nonce-bearing Space DPoP proofs #129; the live server must be rebuilt and deployed before browser clients can retry.
  • The change addresses the observed invalid Authorization header CORS interoperability failure; it does not create missing Spaces automatically.

@haileyok
haileyok marked this pull request as ready for review August 25, 2026 00:02
@haileyok
haileyok merged commit 2d705ca into main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant