Closed itsdarrylnorris closed 4 years ago
@now/node
identifyUser(ctx: NextPageContext)
. Moreover, identifyUser()
is for use of getInitialProps()
. I'll comment on it later.const [reqProxy] = composePassport.initializePassport(req, res);
reqProxy.user; // <-
I also recommend you to understand how Passport works first.
I thought this is a Next.js example and it doesn't have perfect compatibility to @now/node
If you think the issue is out-scope from this project. We can close it.
This ↓ might be what you want, but I didn't validate it.
Thanks, I could play around with this later today.
Hey @piglovesyou ,
I tried this in identifyUser()
and does not seems to be working.
const [reqProxy] = composePassport.initializePassport(req, res);
reqProxy.user; // <-
I am going to close this task since is out the scope of this project. Also, I can keep track of my own session after the user login.
Problem
I am trying to figure out how I can use the
identifyUser
function onnow/node
API. I tried to call the function inside of simple API and I am getting some errors./api/user.ts
And I am getting this error: