javascript - Sessions for cordova app? -


so have sessions configured this.

    app.use(session({       store: new redisstore(),        key: 'localhost.sid',        secret: 'keyboard cat',       cookie:{ domain: '.localhost.io' }     })); 

that works main app, looks cordova conflict , not save cookie cordova app. when remove key, store, , cookie seems work well.

is there way use boolean evaluate if on site or on app?

you shouldn't use cookies in cordova app. use token-based authentication instead.

check out: https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -