feat(oauth2): add email format transformation support (#818)

* feat(oauth2): add email format transformation support

- Add enableEmailFormat, userEmailFormat, userEmailReplace fields
- Support regex pattern matching and replacement template ($1, $2, etc.)
- Add Linux Do OAuth2 template with email format pre-configured
- Add input length limit (256 chars) to prevent ReDoS attacks
- Update admin UI with conditional display and tooltips
- Update documentation (zh/en) with configuration examples

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: update lock files and version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: restore accessTokenFormat as optional field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Dream Hunter
2026-01-23 21:30:44 +08:00
committed by GitHub
co-authored by Claude Opus 4.5
parent e4c96c9868
commit decede7ed3
13 changed files with 906 additions and 791 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "cloudflare_temp_email",
"version": "1.2.1",
"version": "1.3.0",
"private": true,
"type": "module",
"scripts": {
@@ -11,24 +11,24 @@
"build": "wrangler deploy --dry-run --outdir dist --minify"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20260118.0",
"@cloudflare/workers-types": "^4.20260123.0",
"@eslint/js": "9.39.1",
"@simplewebauthn/types": "10.0.0",
"@types/node": "^25.0.9",
"@types/node": "^25.0.10",
"eslint": "9.39.1",
"globals": "^16.5.0",
"typescript-eslint": "^8.53.0",
"wrangler": "^4.59.2"
"typescript-eslint": "^8.53.1",
"wrangler": "^4.60.0"
},
"dependencies": {
"@aws-sdk/client-s3": "3.888.0",
"@aws-sdk/s3-request-presigner": "3.888.0",
"@simplewebauthn/server": "10.0.1",
"hono": "^4.11.4",
"hono": "^4.11.5",
"jsonpath-plus": "^10.3.0",
"mimetext": "^3.0.27",
"postal-mime": "^2.7.3",
"resend": "^6.7.0",
"resend": "^6.8.0",
"telegraf": "4.16.3",
"worker-mailer": "^1.2.1"
},