QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.25k stars 59 forks source link

The `Set-Cookie` header is lost after `redirect` in Server Actions #254

Closed Yovach closed 10 months ago

Yovach commented 10 months ago

Describe the bug The Set-Cookie header is lost after using redirect in Server Actions.

To Reproduce Steps to reproduce the behavior:

  1. Clone the following repo : https://github.com/Yovach/nextjs-cookies-redirect
  2. Start the Next.js dev server (pnpm dev)
  3. Go to http://localhost:3000/login and submit a random username
  4. You're redirected to http://localhost:3000/profile with your username
  5. Refresh and your username disappears

Expected behavior The Set-Cookie should be shown on the Server Action call. Go to http://localhost:3000/ok/login and submit an username You should be redirected to http://localhost:3000/ok/profile and be able to redirect with your username

About (please complete the following information):

QuiiBz commented 10 months ago

Duplicate of #212