How to use Credentials Provider to integrate with existing backend? #5391
Unanswered
michaelaflores
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Attempting to follow the relevant docs for integrating with an existing auth backend led me to this Issue, where the docs themselves don't lead to a working implementation against an existing auth backend. Is it known the docs for integration with existing auth is requiring usage of either unstable_getServerSession or some other code that's not in a guide? I've ended up going through various dev.to articles linked from the docs, and various iterations, to get next-auth in a new repo working against an existing auth backend, to no avail.
My problem is the client Sid code is not receiving any of the auth information returned in my
authorize
function. In the current iteration I began getting thisError serializing
.session.user.imagereturned from
getServerSidePropsin "/". Reason:
undefinedcannot be serialized as JSON. Please use
nullor omit this value.
error, which after going through this for a few hours made me start thinking maybe next-auth just isn't supposed to be used in this manner. At this point I'm guessing next-auth isn't meant to be used against an existing auth backend perhaps.Here's what I have set up, littered with a lot of logs due to this not working according to the docs so far.
Beta Was this translation helpful? Give feedback.
All reactions