session-cookies

How to keep the session active when redirecting from domain to subdomain in Express js/

ぃ、小莉子 提交于 2019-12-13 00:36:46
问题 I am working on an Express project(MEAN). i have my login/register page at myDomain.com and on login i want to redirect the user to user.myDomain.com . I am storing the session in MongoDb using session storage module. I can redirect the user to the subdomain but since the session is not maitained in between the domain and subdomain.. it redirects user to the login page. I have looked and tried everything from Using Express and Node, how to maintain a Session across subdomains/hostheaders

Auth logout is not working in CakePHP 2.x

别等时光非礼了梦想. 提交于 2019-12-12 16:18:07
问题 When I login from one user account session is set.Then opening the next tab on same browser and enter login url it takes me to the login page.But actually it should redirect to the "dashboard" page(in my case). It can't redirect to loginRedirect (dashboard) page as mentioned in my Auth . When i logout, as per my code session,cookie and cache are deleted. but it's not redirect to logoutRedirect page. My code : App controller public $components = array( 'Session', 'RequestHandler', 'Email',

Does Angular 2 application block cookies from being stored by default?

☆樱花仙子☆ 提交于 2019-12-12 12:48:02
问题 A developer of a backend to which I am connecting is assuring me that when he sends a cookie in set-cookie header that the browser should automatically save the cookie and send it back with following requests. Does Angular 2 block cookies from being sent? Since backend and frontend are both running on localhost, does them being on different ports block cookies from being sent with the requests? 回答1: With a different port it's a CORS request. Set on the client xhr.withCredentials = true See

How to set a cookie in jquery using toggle()

好久不见. 提交于 2019-12-12 11:42:22
问题 Looking for a cookie to be set when the user clicks on the link it'll open the div then the user can refresh the page and see the div is still open. =======HTML======= <a class="show-settings" href="#"></a> ========jQuery======= $(function () { //Toggle Settings var s = $("a.show-settings"); //On click to toggle settings s.click(function () { $("#s4-ribbonrow, #s4-titlerow").toggle(); }); //Add/Remove text s.toggle(function () { //$(this).text("Hide Settings"); }, function () { //$(this).text

How can I get $_SESSION data from SESSID?

梦想与她 提交于 2019-12-12 10:37:39
问题 I have a PHP websocket server (https://github.com/lemmingzshadow/php-websocket/). When an user connects, I want to set/get some session data. The problem is that I can't use $_SESSION because if I do that, instead of clients' session I get the session of my websocket server. I have managed to get clients' SESSID: private function handshake($data) { $this->log('Performing handshake'); if(preg_match("/PHPSESSID=(.*?)(?:;|\r\n)/", $data, $matches)){ $sessid = $matches[1]; } /* Do handshake */ }

Rack Session Cookie and Sinatra - setting and accessing data

こ雲淡風輕ζ 提交于 2019-12-12 08:35:37
问题 I was using Rack Session Pool, however my users would get kicked off one webserver thread onto another making the session data expire. I started toying around with just enable :sessions in Sinatra, however I am unable to use that because I have mutliple apps using Sinatra (same key it appears to be using - not sure if this is because its the same host or not) So since my apps would break each other, I now am trying Rack Session Cookie and setting the variables (same thing as enable :sessions,

How to secure a cookie in android?

妖精的绣舞 提交于 2019-12-12 05:58:57
问题 I am using Android's CookieManager to set a cookie in webview which acutally contains user id. I want to make this cookie secure to avoid any impersonation attacks. How can i make it as secure cookie since CookieManager supports only basic string key value pairs. Also will the cookie be secure if the connection is through HTTPS Protocol ? 回答1: Not sure what you are doing, but cookies are set at the server. Thus you cannot make it secure on your side only. If you want to make sure your cookie

What is the best method to set a session cookie using Python 3.x and Cgi on Apache?

余生长醉 提交于 2019-12-12 05:31:23
问题 I develop in Php, Perl and now am liking Python so much that I want to use it on the web. I can get things working that I need except for a good method for setting/managing sessions. Any help out there? Point me to a library? or ideally post some working python code for my technology stack? (looking for updated information on how to do this without depending on any framework) 来源: https://stackoverflow.com/questions/45155617/what-is-the-best-method-to-set-a-session-cookie-using-python-3-x-and

PHP cookie across 2 top level domains

风流意气都作罢 提交于 2019-12-12 05:00:07
问题 I have 2 domains (e.g. test1.com and test2.com) and I need a user login across these 2 domains. Both domains run on the same server. I hope for some help. :) 回答1: As there is no way to set something like "global cookies", you have to solve this on the server side somehow. 回答2: You cannot use a cookie as cookies are only visible on same domain. One solution is to redirect the user twice, once to the other site including some authentication info on the url to have that site set its on logged in

I can't delete cookies in Express

房东的猫 提交于 2019-12-12 04:59:49
问题 If I set a cookie using res.cookie('TEST', 'Test content.').status(200).send('Cookie set.'); I see that it is correctly set in the browser. However, on another page, if I do res.clearCookie('TEST').status(200).send('Cookie cleared.'); I see that the cookie is not deleted. I would like to completely remove this cookie. I've also tried res.clearCookie('TEST', {path: '/'}); to no avail. I'm including cookie-parser like this: const cookieParser = require('cookie-parser'); app.use(cookieParser