Commit Graph

11 Commits (main)

Author SHA1 Message Date
Johnny f66c750075 chore: simplify attachment file writing 2 weeks ago
Johnny 1a9bd32cf1 feat(auth): add PKCE support and enhance OAuth security
Implements critical OAuth 2.0 security improvements to protect against authorization code interception attacks and improve provider compatibility:

- Add PKCE (RFC 7636) support with SHA-256 code challenge/verifier
- Fix access token extraction to use standard field instead of Extra()
- Add OAuth error parameter handling (access_denied, invalid_scope, etc.)
- Maintain backward compatibility for non-PKCE flows

This brings the OAuth implementation up to modern security standards as recommended by Auth0, Okta, and the OAuth 2.0 Security Best Current Practice (RFC 8252).

Backend changes:
- Add code_verifier parameter to ExchangeToken with PKCE support
- Use token.AccessToken for better provider compatibility
- Update proto definition with optional code_verifier field

Frontend changes:
- Generate cryptographically secure PKCE parameters
- Include code_challenge in authorization requests
- Handle and display OAuth provider errors gracefully
- Pass code_verifier during token exchange

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

Co-Authored-By: Claude <noreply@anthropic.com>
1 month ago
johnnyjoy a0f68895ab chore: add more logs for oauth2 8 months ago
johnnyjoy eb33a604b2 feat: support mapping avatar url from oauth2 9 months ago
Steven 43d13a3edc chore: tweak linter 1 year ago
Steven b376a20fb4 chore: tweak linter warnings 1 year ago
Steven cf4db17080 chore: fix linter 2 years ago
Steven c373131b89 chore: migrate idp service 2 years ago
Steven cd0ea6558d chore: update golangci-lint config 2 years ago
boojack 723c444910
chore: update server tests (#2118) 2 years ago
boojack 69726c3925
feat: implement oauth2 plugin (#1110) 3 years ago