My issue was not specifying to send cookies when using fetch on the client-side. It worked after including the credentials: ‘include’ field in the request.
fetch('/api/foo', {credentials: 'include'})
More Related Contents:
- Understanding passport serialize deserialize
- ERR_HTTP_HEADERS_SENT: Cannot set headers after they are sent to the client
- How to implement a secure REST API with node.js
- passport’s req.isAuthenticated always returning false, even when I hardcode done(null, true)
- Redirecting to previous page after authentication in node.js using passport.js
- passport.js passport.initialize() middleware not in use
- Using PassportJS, how does one pass additional form fields to the local authentication strategy?
- How to know if user is logged in with passport.js?
- How do I redirect in expressjs while passing some context?
- Extend Express Request object using Typescript
- How can I set cookie in node js using express framework?
- Difference between app.use and app.get in express.js
- MongoDB/Mongoose querying at a specific date?
- First Heroku deploy failed `error code=H10`
- Expressjs raw body
- When to use next() and return next() in Node.js
- How to populate a sub-document in mongoose after creating it?
- mongoose custom validation using 2 fields
- req.query and req.param in ExpressJS
- NodeJS / Express: what is “app.use”?
- Proxy with express.js
- Redirect all trailing slashes globally in express
- Docker – SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:3306
- Passing route control with optional parameter after root in express?
- ENOENT: no such file or directory .?
- Passing arguments to require (when loading module)
- Node.js – logging / Use morgan and winston
- Firebase Functions HTTPS 403 Forbidden
- Slack dialog doesn’t close after form submission
- Toggle between multiple .env files like .env.development with node.js