I have a Node/Express application hosted on Heroku that has a domain that I purchased for it. When using the application on my desktop it works fine. I can log-in just fine when I visit it's domain at https://myapp.app or where it's hosted at on…
I was messing around with Express JS and was the using express-session. It didn't work if I didn't put the app.use(session()) middleware first
app.use(session({
name: 'server-session-cookie-id',
secret: 'my express secret',
…
I am in the middle of decoupling my frontend from my backend repo. In doing so I am hosting my server on a personal Raspberry Pi 3 on my home network. My frontend is hosted by Netlify.
I have run into a problem where I am not able to set cookies on…
I am trying to save a session variable for a user when they login. This works on the computer, but when I try it on an iPad using Safari or Chrome it doesn't save.
Here is where I set up my session:
app.set('trust proxy', 1)
app.use(session({
…
Yesterday, I tried to make a website, using Node.js and the framework Express.js. On this website, the user needs to log, with credentials, who are checked in database. If the credentials are correct, I want to save the user's informations in a…
My express-session is working, I tested it with a very short cookie max-age (10 secs) and it works as intended:
app.use(session({
secret: 'xxx',
resave: false,
saveUninitialized: true,
cookie: { secure: true, maxAge: 10000 }
}));
The…
I'm using a passport local strategy that works well with express:
passport.use(localStrategy);
passport.serializeUser((user, done) => done(null, JSON.stringify(user)));
passport.deserializeUser((obj, done) => done(null,…
I'm working on facebook, google, github, twitter authentication with passport. Authentication with facebook, google, github are executing how in tutorial was written. Only twitter back me message:
500 Internal Server Error: OAuth authentication…
I am using the express-session module, it works perfectly on localhost but on my website (hosted on Heroku using Cloudflare), the express session is being blocked as being a third party cookie. Here is the configuration for my session:…
I've seen lots of questions about this, but none of the answers has solved my issue. I'm using express-session and I want the users session to remain alive as long as the user makes a request before the coookie MaxAge expires, hence I'm using the…
I cant understand how i can set cookie (connect sid) in REACT from my back-end.
I have a Passport Local Strategy
Here is my server.js
app.use(cookieParser());
app.use(session({
resave: true,
saveUninitialized: false,
secret: 'bla bla bla',
…
I use node express 4.0 to implement a message code verify function.
I use session to store the msg code I send.
I set up the session middleware as dos said:
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
…
After the latest updates in chrome, the browser is not saving my server cookies. Previously, it was working even it showed a warning about it. But now it is not.
Since my react app is hosted on netlify and my server runs on AWS, it is cross-origin.…
Fellow web developer here. I seem to be running into this problem (that didn't occur until recently) where the cookie Session ID gets changed on every API request.
Edit Confirms to work in IE11 & Edge!? Not Chome?! WTF! Doesn't work with fetch and…
I have an API running in a certain server, when you send a successful request to the login endpoint, it provides you with a JSONWEBTOKEN.
On my second server, I'm running a website which is sending the requests to the API. What I want is to save…