next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

refactor(core): use standard `Request` and `Response`

Open balazsorban44 opened this issue 2 years ago • 1 comments

Continues #4704, should be merged before #4299

  • [x] parse body
  • [x] handle cookies
  • [ ] verify (detect host), normalize (full URL), fallback (localhost) URL

balazsorban44 avatar Jun 26 '22 19:06 balazsorban44

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
next-auth ⬜️ Ignored (Inspect) Dec 3, 2022 at 1:35PM (UTC)

vercel[bot] avatar Jun 26 '22 19:06 vercel[bot]

Looks like Jest vs. Node.js has a different Response :face_exhaling: need to work it out for tests to pass.

balazsorban44 avatar Oct 05 '22 14:10 balazsorban44

🎉 Experimental release published 📦️ on npm!

pnpm add [email protected]
yarn add [email protected]
npm i [email protected]

github-actions[bot] avatar Oct 06 '22 23:10 github-actions[bot]

Changes make sense to me!

wobsoriano avatar Nov 08 '22 06:11 wobsoriano

Hi! This indeed was a nice improvement. But unfortunately this change caused a breaking change for libs depending on NextAuthHandler, like @sidebase/nuxt-auth and next-auth/apps/playground-nuxt, but it was released as patch version. I think a warning should be added to release notes in case other libs face the same issue.

JoaoPedroAS51 avatar Dec 08 '22 15:12 JoaoPedroAS51

@JoaoPedroAS51 well TBF they didn't tell anyone to use their INTERNALS YET. They only have the default React and Next usage available in the public.

So if your library is using NextAuthHandler, which is not documented somewhere, yet, it's most likely not their fault.

walmartwarlord avatar Dec 08 '22 22:12 walmartwarlord

@walmartwarlord Yeah, I understand your point. And if this is the case, I understand why this was a patch version. We weren't aware it was internal since the example for nuxt app integration used it and there was no @internal flag in the function to indicate. We just followed the approach from there.

I just commented here to warn in case this wasn't an intentional breaking change.

JoaoPedroAS51 avatar Dec 08 '22 23:12 JoaoPedroAS51