Repository navigation
feat: remove react from next-auth, move to vue - #1
Conversation
commit: |
The inline email normalizer validated the address on the ASCII `@` before any
Unicode normalization. A character that is a homoglyph of `@` — e.g. U+FF20
FULLWIDTH COMMERCIAL AT — passed the single-`@` (atCount) check, but can be
canonicalized to an ASCII `@` by a downstream address parser (NFKC), splitting
the address into multiple recipients (CWE-180: validate before canonicalize).
Apply `String.prototype.normalize("NFKC")` before validation so any such
homoglyph becomes a real `@` and is rejected by the existing atCount check.
Behaviour on legitimate addresses is unchanged. Adds a regression test.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 19d2feb)
`detectOrigin` returned the auto-detected forwarded host whenever `VERCEL`/`AUTH_TRUST_HOST` was set, ignoring an explicitly configured `NEXTAUTH_URL`. A configured canonical URL should always win; only fall back to the forwarded host when no `NEXTAUTH_URL` is set. Adds unit tests for detectOrigin precedence. (cherry picked from commit 2a39465)
fix(github): add issuer to github (cherry picked from commit 0497da4)
| // If `NEXTAUTH_URL` is `undefined` we fall back to "http://localhost:3000" | ||
| // `NEXTAUTH_URL` is `undefined` here; callers fall back to | ||
| // "http://localhost:3000". | ||
| return process.env.NEXTAUTH_URL |
There was a problem hiding this comment.
Q: Should we return undefined here? Since "" its also "falsy" we might return "" and not undefined
There was a problem hiding this comment.
I considered doing this and decided not to:
NEXTAUTH_URL |
detectOrigin() |
parseUrl() |
|---|---|---|
| Unset | undefined |
http://localhost:3000/api/auth |
"" |
"" |
TypeError: Invalid URL |
"https://app.example.test" |
Configured URL | https://app.example.test/api/auth |
The reason being is that TypeError which I think is better than silently defaulting to localhost when NEXTAUTH_URL= was provided, would you agree?
There was a problem hiding this comment.
Sounds good, but should we adjust the comment here? (just as nit) Currently says: NEXTAUTH_URL is undefined here; callers fall back to "http://localhost:3000". which is not 100% correct.
There was a problem hiding this comment.
This is taken from the upstream package, so I'd prefer to keep it synced despite it being not fully correct: https://github.com/nextauthjs/next-auth/blob/d857eec560fb99c8b18d3b22a2693b849a62d1c3/packages/next-auth/src/utils/detect-origin.ts#L14-L16
☕️ Reasoning
This PR removes
react,preactandnextdependencies from thenext-authpackage, replacing the functionality withvueinstead, for better integration with NuxtAuth.nodemailerpeer support to allow newer patched releases and avoid known audit findings from older 7.x versions. Consumers using advanced Nodemailer options should review the breaking changes in 8.0 and 9.0, especially auth error codes and stricter TLS validation for remote content/OAuth/proxy requests.🧢 Checklist
🎫 Affected issues
📌 Resources