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
9
votes
3 answers

Express-session is not setting cookies in browser

So I'm using express-session package to set cookie and session. It's also connected to my MongoDB store to store session. When user logs in, session gets stored in database just fine but there's no cookie in the browser. My app is running in…
9
votes
1 answer

Keeping a session when using HttpWebRequest

In my project I'm using C# app client and tomcat6 web application server. I wrote this snippet in the C# client: public bool isServerOnline() { Boolean ret = false; try { HttpWebRequest req =…
CeccoCQ
  • 3,746
  • 12
  • 50
  • 81
9
votes
3 answers

Helper Class not Accessible from View

I defined a helper class as below module SessionsHelper def current_user @current_user= User.find_by_fbid(session[:fbid]) end def sign_in(user) session[:fbid] = user.fbid @current_user = user end def…
geeky_monster
  • 8,672
  • 18
  • 55
  • 86
9
votes
1 answer

Flask – multiple session cookies with the same name

I have found a very strange problem in my Flask application. I discovered that in some circumstances multiple session cookies could be created with the same name. I attached a picture about it. It is not browser specific. It is strange itself, but…
igoemon
  • 177
  • 2
  • 15
9
votes
4 answers

.net core 3.1 cannot delete cookies

I have web app based on .net core3.1 and iis server. For some reason, I cannot delete cookies on logout. I tried Response.Cookies.Delete(cookie.Key); and Response.Cookies.Append(cookie.Key, "", options); with options.Expires =…
santipianis
  • 131
  • 2
  • 8
9
votes
1 answer

Url rewrite in apache based on cookie value

can we write rewrite rules in apache based on the value available in cookie. below is the sample cookie value (from firebug). In this i need to control my rewrite rule based on the value jforumUserId JSESSIONID=96A0AFA5E2EE4500C8483679DA530041; …
Gnanz
  • 1,833
  • 5
  • 24
  • 51
9
votes
1 answer

What is the default session expiry in .NET Core 2.x?

In my startup class, I am enabling session storage with this line: services.AddDistributedMemoryCache() .AddSession(options => { options.IdleTimeout = TimeSpan.FromMinutes(20); …
Dinerdo
  • 560
  • 7
  • 27
9
votes
1 answer

custom state management for Java EE

I've worked with Java EE (now Jakarta EE) since before it was named "EE" (i.e. servlets, etc.) but the last time I was deeply into session management was over 15 years ago. Now we have new technologies and trends such as the HTML5 Web Storage API…
9
votes
2 answers

How to import firefox cookies to python requests

I'm logged in on some page in Firefox and I want to take the cookie and try to browse webpage with python-requests. Problem is that after importing cookie to the requests session nothing happen (like there is no cookie at all). Structure of the…
Ondrej
  • 817
  • 1
  • 9
  • 16
9
votes
3 answers

Proper Session Management with REST API

I've finished designing a RESTful API, in which I authenticate each request with an API Token that's sent as a param. Now I want to create a client interface, and I was wondering what's a properly secure way to manage a session with each browser…
user3134477
9
votes
7 answers

Yahoo Finance Historical data downloader url is not working

I have used the following url to fetch the historical data from yahoo finance. From last 16th May, 2017 the url is not working. http://real-chart.finance.yahoo.com/table.csv?s=AAL&a=04&b=01&c=2017&d=04&e=02&f=2017&g=d&ignore=.csv Seems like they…
Suvonkar
  • 2,440
  • 12
  • 34
  • 44
9
votes
3 answers

SameSite flag on Jetty session cookies

How can I add the flag SameSite=Lax or SameSite=Strict to session cookies generated by Jetty if I am using it to host war files?
Dr.Haribo
  • 1,778
  • 1
  • 31
  • 43
9
votes
3 answers

PHP authentication with multiple domains and subdomains

I have one main domain: main.com, subdomains: test1.main.com, test2.main.com and other domains one.com, two.com. Now it's done like these: ini_set("session.cookie_domain", ".main.com"); $domain = 'main.com'; login.php $user = $db->query("SELECT…
swamprunner7
  • 1,321
  • 6
  • 16
  • 25
9
votes
2 answers

Renewing/Refreshing Express Session

In my app I restrict some access to some actions and pages if a user is not logged in. I have: var restrict = function(req, res, next) { if (!req.user) { console.log("USER isn't logged in.") return res.status(403).send('Access or…
gcc
  • 283
  • 1
  • 3
  • 14
9
votes
13 answers

TokenMismatchException in VerifyCsrfToken.php line 53 in Laravel 5.1

When I try to login show me token error. I have checked token in view form it's right and when comment \App\Http\Middleware\VerifyCsrfToken::class, in the Kernel.php it makes me login but after Redirect to my dashboard I'm not logged in. I am using…
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82