A
A
Alexey Yarkov2016-05-16 16:01:58
Node.js
Alexey Yarkov, 2016-05-16 16:01:58

Why does authorization from a mobile phone with the option enabled not work?

var session = require('express-session');
// Создаем сервер на Express4
app.use(session({
  genid: function(req) {
    return uuid.v4();
  },
  saveUninitialized: false,
  resave: true,
  cookie: { 
    name: "SSID",
    maxAge:  (60*60*1000*24),
    secure: true // <- ПРОБЛЕМА
  } , 
  key: "SSID",
  secret: "super secret string",
  proxy: true,
  store: MongoStore
}));

If secure: true , then when authorizing from a mobile phone, a login occurs on the site, and the next time it accesses the server, it does not see cookies with the SSID name. Everything works on the computer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Алексей, 2016-05-16
@alsopub

1) Проверьте дату на телефоне
2) Прверьте на один ли домен заходите (с www или без www) на случай если куки ставится на один домен, а потом срабатывает переадресация, например на www.domain.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question