• Johnny's avatar
    feat(auth): add PKCE support and enhance OAuth security · 1a9bd32c
    Johnny authored
    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: 's avatarClaude <noreply@anthropic.com>
    1a9bd32c
Name
Last commit
Last update
.github Loading commit data...
cmd/memos Loading commit data...
internal Loading commit data...
plugin Loading commit data...
proto Loading commit data...
scripts Loading commit data...
server Loading commit data...
store Loading commit data...
web Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
.golangci.yaml Loading commit data...
CLAUDE.md Loading commit data...
CODEOWNERS Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...