cloudflare-next-intl 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -255,7 +255,7 @@ auto-wires `AuthUserProvider` and server-side `getAuthUser` session validation.
255
255
  Features include:
256
256
  - `createForgotPasswordAction(locale, actionCodeSettings?)`: Accepts optional Firebase `AuthActionCodeSettings` (e.g. `url` redirect link).
257
257
  - `sendVerificationEmail(actionCodeSettings?)` on `useAuthUser()`: Custom action email settings when resending email verification.
258
- - `followSameOriginContinueUrl`: Automatically forwards emailed action links with `continueUrl` to the specified path (or external URL) directly from `intlMiddleware` (default `true`; set `false` on `firebaseAuth` config to disable).
258
+ - `followSameOriginContinueUrl`: Automatically forwards emailed action links with `continueUrl` to the specified path (or external URL) directly from `intlMiddleware` (default `true`; set `false` on `firebaseAuth` config to disable). If `continueUrl` points to home root (`/`), it resolves to the mode target path (e.g. `/reset-password`).
259
259
 
260
260
  ```tsx
261
261
  import ThemeSwitcher from "cloudflare-next-intl/ThemeSwitcher";
@@ -261,7 +261,14 @@ export default async function updateSession(request, baseResponse, locale, rebui
261
261
  }
262
262
  }
263
263
  else {
264
- // External continueUrl: redirect directly to the full external URL
264
+ if (parsed.pathname === '/') {
265
+ if (fa.actionLinkPath) {
266
+ parsed.pathname = fa.actionLinkPath;
267
+ }
268
+ else if (target) {
269
+ parsed.pathname = `${localePrefix}${target}`;
270
+ }
271
+ }
265
272
  parsed.search = request.nextUrl.search;
266
273
  return buildRedirect(baseResponse, parsed);
267
274
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-next-intl",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Optimized Next Intl Package Special for App Router and Cloudflare",
5
5
 
6
6
  "main": "dist/index.js",