Skip to content

OAuth sessions#589

Draft
ngerakines wants to merge 5 commits intoMarshalX:mainfrom
ngerakines:ngerakines/oauth-1744165264
Draft

OAuth sessions#589
ngerakines wants to merge 5 commits intoMarshalX:mainfrom
ngerakines:ngerakines/oauth-1744165264

Conversation

@ngerakines
Copy link
Copy Markdown

This PR implements OAuth session support.

This is not ready for review or production.

@DGaffney
Copy link
Copy Markdown
Contributor

DGaffney commented Apr 18, 2025

Thread bump - @MarshalX I've now incorporated this into Graze social and can confirm we're able to work with it! Would love to see this get into the main branch - once @ngerakines says its good ofc. Would love to hear what you think!

@MarshalX
Copy link
Copy Markdown
Owner

@DGaffney I did not check the code in this PR since it is marked as WIP but I am totally not against any OAuth support in SDK. I have "rewrite bsky`s oauth cookbook to SDK" in my TODO list for a long time :) it will help to close #558

@ECAllen
Copy link
Copy Markdown

ECAllen commented Oct 21, 2025

Is this abandoned? Seems like there is demand for this feature.

zzstoatzz added a commit to zzstoatzz/atproto that referenced this pull request Oct 28, 2025
Implements complete OAuth 2.1 support following the ATProto OAuth specification
(https://atproto.com/specs/oauth), building on concepts from PR MarshalX#589.

Features:
- Full OAuth 2.1 authorization code flow with PKCE (S256) and DPoP (ES256)
- Pushed Authorization Requests (PAR)
- DID-based authentication with handle/DID resolution
- PDS endpoint and authorization server discovery
- Automatic DPoP nonce rotation
- Client assertions for confidential clients
- Pluggable state and session stores
- SSRF protection and security best practices

Components:
- New package: atproto_oauth with complete OAuth client
- PKCE manager for code challenge generation
- DPoP manager for JWT proof generation
- Security utilities with URL validation
- Metadata discovery for auth servers and PDS
- Abstract and in-memory stores for state/sessions
- 12 unit tests (all passing)
- Flask reference implementation
- Comprehensive documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
zzstoatzz added a commit to zzstoatzz/atproto that referenced this pull request Nov 14, 2025
Implements complete OAuth 2.1 support following the ATProto OAuth specification
(https://atproto.com/specs/oauth), building on concepts from PR MarshalX#589.

Features:
- Full OAuth 2.1 authorization code flow with PKCE (S256) and DPoP (ES256)
- Pushed Authorization Requests (PAR)
- DID-based authentication with handle/DID resolution
- PDS endpoint and authorization server discovery
- Automatic DPoP nonce rotation
- Client assertions for confidential clients
- Pluggable state and session stores
- SSRF protection and security best practices

Components:
- New package: atproto_oauth with complete OAuth client
- PKCE manager for code challenge generation
- DPoP manager for JWT proof generation
- Security utilities with URL validation
- Metadata discovery for auth servers and PDS
- Abstract and in-memory stores for state/sessions
- 12 unit tests (all passing)
- Flask reference implementation
- Comprehensive documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

4 participants