memos/web/src/utils
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>
2025-12-01 00:04:26 +08:00
..
remark-plugins chore: tweak comments 2025-11-30 13:16:02 +08:00
attachment.ts feat: generate thumbnails for images stored in S3 and generate thumbnails with a maximum size (#5179) 2025-10-23 21:29:22 +08:00
i18n.ts chore: tweak comments 2025-11-30 13:16:02 +08:00
markdown-list-detection.ts chore: tweak comments 2025-11-30 13:16:02 +08:00
markdown-manipulation.ts chore: tweak comments 2025-11-30 13:16:02 +08:00
memo.ts chore: update url of memo detail page 2025-02-07 20:51:04 +08:00
oauth.ts feat(auth): add PKCE support and enhance OAuth security 2025-12-01 00:04:26 +08:00
theme.ts chore: tweak comments 2025-11-30 13:16:02 +08:00
user.ts
uuid.ts