nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
25k stars 3.53k forks source link

feat: Add ability to customize client-side fetch calls #12204

Open willwill96 opened 1 week ago

willwill96 commented 1 week ago

โ˜•๏ธ Reasoning

Currently, if you have your next-auth SessionProvider is configured to point to a separate domain from the next.js app, next-auth related cookies will not be sent in your requests. In order to send cookies on cross-origin request, you have to use { credentials: 'include' } when you make your fetch request. This approach allows users to pass custom fetch options that will be passed to the underlying fetch calls.

๐Ÿงข Checklist

๐ŸŽซ Affected issues

(These are discussions, not issues):

Fixes: https://github.com/nextauthjs/next-auth/discussions/12203 Fixes: https://github.com/nextauthjs/next-auth/discussions/8799

๐Ÿ“Œ Resources

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
auth-docs โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Nov 9, 2024 2:48am
1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **next-auth-docs** | โฌœ๏ธ Ignored ([Inspect](https://vercel.com/authjs/next-auth-docs/2KfhL9gwWrUzmzU4K1YcriV8Gb38)) | [Visit Preview](https://next-auth-docs-git-fork-willwill96-main-authjs.vercel.app) | | Nov 9, 2024 2:48am |
vercel[bot] commented 1 week ago

@willwill96 is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.