Feature Request: [next-auth/react] Add ability to customize underlying #12203
william-will-angi
started this conversation in
Ideas
Replies: 1 comment
-
I created a PR with the way I was thinking about the problem: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
Background
We are exploring a setup where we have next-auth hosted on
next-auth.app.com
as a dedicated service, while a consuming app lives onfrontend.app.com
. The problem we are running into is that thefetch
calls will not include the next-auth cookies necessary without adding a{ credentials: 'include' }
as an option to the request, so none of the client-side utilities work out of the box.There are few places where this is discussed like here:
#1299 (comment)
Proposal
It seems like the simplest solution would be to add a prop to the
SessionProvider
component, that would allow you to customize this behavior, most likely updating the underlying fetch options.I can probably put together a PR with what I am imagining.
I am willing to contribute to a discussion of this feature as well as creating the PR if the changes are not overly complex.
Beta Was this translation helpful? Give feedback.
All reactions