Questions tagged [session-cookies]

Session cookies enable a server and a browser to establish an identified connection (through cookies) and communicate though it.

Session cookies are temporary files that exist for a particular user for a pre-defined duration. Once this duration is expired, the session cookies are erased.

Session cookies allow a website to keep a state or memory of the visitor as they navigate between pages of the website.

4816 questions
7
votes
3 answers

Update Cookies in Session Using python-requests Module

I'm using python-requests module to handle oAuth request and response. I want to set received access_token (response content as dict) in requests.session.cookies object. How can I update existing cookies of session with received response from…
Yajushi
  • 1,175
  • 2
  • 9
  • 24
7
votes
1 answer

Maintaining Facebook User ID in Session

I'm trying to add facebook login to my site. I've authenticated with facebook JavaScript SDK and created a cookie with user id. The problem is that when user logs out (I'm destroying all cookies) and navigates to another page on site, I can still…
7
votes
2 answers

How unique is the HttpSession ID?

I am going to uniquely identify a user by storing a unique ID in his/her cookie. HttpSession ID is a good choice from my google search. Just wanted to know how unique it is ? Is it unique to the webcontainer or once it expires , will it get…
Tito
  • 8,894
  • 12
  • 52
  • 86
7
votes
3 answers

express cookie return undefined

I'm trying to set cookie on express.js but it return undefined. I've searched many web pages and put express.cookieParser() above app.use(app.router) but it still can't return the right value. app.js app.configure(function(){ var RedisStore =…
LiJung
  • 7,649
  • 6
  • 27
  • 30
7
votes
4 answers

Using same cookie across selective subdomains

I have been trying to find out a way to share cookies across multiple subdomains. Setting the cookie like: setcookie('token', base64_encode(serialize($token)), time()+10800, '/', '.mydomain.com'); does exactly that. But there is a slight problem…
Vishesh Joshi
  • 1,601
  • 2
  • 16
  • 32
7
votes
1 answer

How does Stackoverflow keep users signed in over HTTP?

I've noticed that stackoverflow only uses SSL on the login page, and that questions/answers can be posted over HTTP. Users must be logged in to do that, and so I'm wondering how stackoverflow manages to track which users are logged in, if SSL is…
stephenmurdoch
  • 34,024
  • 29
  • 114
  • 189
6
votes
1 answer

Cookie law on age verification

I have a web site to do with alcohol that needs to verify the age before letting them on to the web site. I do this with a HttpModule that checks for a cookie and if not set I redirect them to the validation page. I validate their age and store a…
Base33
  • 3,167
  • 2
  • 27
  • 31
6
votes
2 answers

How do I set the PATH in the PHPSESSID cookie?

I have many projects running on my server all of which use PHP sessions for authentication. Now since the PHPSESSID cookie sets the cookie path to '/' in the set-cookie header, this cookie is available throughout the domain, whereas I need it…
YD8877
  • 10,401
  • 20
  • 64
  • 92
6
votes
1 answer

cURL cookie value

I'm trying to download music loop files from this site: looperman.com. I've registered as a user, and I'm trying to download the loops using cURL. When you log into looperman.com, there are a few cookies set, but by process of elimination, I notice…
Matt Kaye
  • 465
  • 1
  • 5
  • 15
6
votes
1 answer

Prevent unauthorized http requests redirected to /error from setting session cookie - spring boot - spring security

Context I'm having some trouble with my application. We're using Spring Boot 2.4.10 and Spring Security 5.4.8. We use cookies to interact with the app. We have a frontend application stored in src/main/resources that, among other things, connects to…
6
votes
2 answers

rails 3 sessions across subdomains not working in Internet Explorer

I am working on a rails 3 application which use subdomains. I used railscasts #221 "Subdomains in rails 3" (http://railscasts.com/episodes/221-subdomains-in-rails-3) as a guide and everything goes well, except in Explorer. To keep my session across…
marrossa
  • 708
  • 6
  • 9
6
votes
1 answer

Storing selected language option in cookie/localSession

I would like my Next.js app to remember which language the user prefers, therefore I want to store it in a cookie on client side. I have 2 language options: EN & FR. By default the language is set up for English (no cookie, myapp.com/), but once the…
user15030566
6
votes
2 answers

Application load balancer session cookie's expiration is extremely high

This may sound like a very trivial doubt, but I need some help here. I have set up Application load balancer with OIDC authentication. After logging into my application, using chrome developer tool I looked into the client application cookie. Found…
6
votes
0 answers

App.UseSession() vs App.UseAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) vs App.UseCookiePolicy()

As described in https://learn.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-3.1#session-state , one can add session to one's web app like so in Start.ConfigureServices services.AddSession(options => { …
user2768479
  • 716
  • 1
  • 10
  • 25
6
votes
3 answers

ASP.NET Core Session Timeout

I remember we have used session.timeout in ASP.NET to change the session timeout which was 20 minutes if not changed. I tried to change the session time out in ASP.NET Core 3.1 in Startup.cs but nothing happens. I use Identity for operators and set…
Mertez
  • 1,061
  • 3
  • 14
  • 38