44,254 questions
-1
votes
0
answers
35
views
How to prevent session timeout in Python [closed]
I am incredibly new to coding and Python, and wanted to know what code I need in order to prevent a session timeout. I am coding a text adventure, and some of the blocks of writing are long, and by ...
0
votes
2
answers
116
views
My authentication setup requires a setTimeout before redirect to allow cookies to write in the browser
Authentication flow:
User is redirected back to my site (to /auth/callback) after logging in with a 3rd party. The redirect back includes query params. The React function on the callback page sends ...
0
votes
1
answer
52
views
how to save the client-id from request cache when a user is redirected to the spring authorization server?
I have implemented or extended on top of Spring Authorization server. I have a authentication controller that accesses the client-id from the RequestCache object.
Now, I have built a sample OAuth app ...
-1
votes
1
answer
67
views
SQLAlchemy session initialization in Command pattern [closed]
A question on consideration for case/approach choice.
Let's say we have an app that has an ORM model and also uses simple realisation of the Command pattern. Inside of each command we need to ...
0
votes
0
answers
75
views
How to save global variable in Spring application
I need to integrate with a third-party system. I need to authenticate there and obtain a sessionId. So, my application will have a URL, login, and password to obtain a sessionId. But to avoid having ...
0
votes
0
answers
55
views
Laravel session lifetime on recursive ajax
I'm using laravel 8 with SESSION_DRIVER=file
I have code that run like below, and I have a problem why the recursive not extending the expired time of session?
Each process take 30sec, but after ...
1
vote
1
answer
107
views
Check $_session does not appear to be working for Location but does for outputting html based on condition
I have the following file
/common/session.php
<?php
session_start();
$secret = getenv('SECRET');
$userinfo = array(
'private'=>$secret
);
if(isset($_GET['logout'])...
525
votes
28
answers
575k
views
Check if PHP session has already started
I have a PHP file that is sometimes called from a page that has started a session and sometimes from a page that doesn't have session started. Therefore when I have session_start() on this script I ...
306
votes
26
answers
746k
views
How to fix org.hibernate.LazyInitializationException - could not initialize proxy - no Session
I get the following exception:
Exception in thread "main" org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer....
0
votes
0
answers
47
views
Need help updating token in next auth. (next.js app router)
I have a Next.js frontend and NestJS backend.
In the backend there is token generation with refresh token rotation logic, and I want to use the same tokens in the frontend with NextAuth setup.
Here’s ...
180
votes
25
answers
290k
views
Laravel - Session store not set on request
I recently created a new Laravel project and was following along with the guide on Authentication. When I visit either my login or register route, I get the following error:
ErrorException in Request....
175
votes
39
answers
277k
views
Sessions don't work. How to debug a php session?
How do I resolve the problem of losing a session after a redirect in PHP?
Recently, I encountered a very common problem of losing session after redirect. And after searching through this website I can ...
1
vote
1
answer
65
views
Session variables are not set on mock request Fat Free Framework
I am trying to write Tests for my App. In the controller I set a message in the session:
$f3->set('SESSION.error_message', 'Some error');
I my test I mock a request to that route and try to check ...
2
votes
1
answer
172
views
How to get remaining ASP.NET Core session expiry time to return it to the client?
I'm working on an ASP.NET Core Web API where I use session middleware with a configured idle timeout, e.g.:
services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(20);
});
...
1
vote
1
answer
261
views
Laravel 12 creates a new session on each request
I created a new Laravel 12 application following the Installation guide. The project is generated correctly and I ran all migrations.
When I run php artisan --version I get: Laravel Framework 12.20.0 (...
1
vote
0
answers
48
views
req.session returns without data, session cookie exists but data missing (Express + Render/Vercel)
I’m trying to deploy a MERN stack website that I’ve been working on locally. While everything works fine locally, after deploying to Render and Vercel, I can’t access session data through req.session. ...
570
votes
9
answers
176k
views
Do sessions really violate RESTfulness?
Is using sessions in a RESTful API really violating RESTfulness? I have seen many opinions going either direction, but I'm not convinced that sessions are RESTless. From my point of view:
...
1
vote
0
answers
139
views
Internal server error "Cannot read properties of undefined" during Google OAuth
I created authentications using Better-Auth and Google as the auth client. I have the correct URL for the authorized JavaScript origins and for the authorized redirect URL and I believe my set up is ...
322
votes
3
answers
216k
views
SQLAlchemy: engine, connection and session difference
I use SQLAlchemy and there are at least three entities: engine, session and connection, which have execute method, so if I e.g. want to select all records from table I can do this on the Engine level:
...
1
vote
1
answer
52
views
OpenCart 4.x: AJAX request returns "Invalid token session" despite valid user_token
I'm developing a custom OpenCart 4.x module that adds a button to the order page to log order data via AJAX. The button makes a GET request to my custom controller, but I'm getting an "Invalid ...
0
votes
1
answer
36
views
Incognito Tabs, different sessions in Spring
Is it possible to handle in Spring Web App that two incognito tabs (within the same profile, e.g. Chrome) have different sessions? Currently, as far as I can see, two tabs have the same sessionId. Is ...
0
votes
1
answer
68
views
How to go from Rust Async-Session's Memory Store to a production setup?
I am currently using Rust Async-Session's Memory Store as a session storage (because I followed the OAuth example in Axum examples). While my code works, the module for Memory Store explicitly states ...
229
votes
14
answers
220k
views
Chrome doesn't delete session cookies
I'm trying to set session cookie in javascript like this:
document.cookie = 'name=alex; path=/'
But Chrome doesn't delete it even if I quit browser and launch it again.
I checked in Firefox and ...
0
votes
1
answer
159
views
Why aren't my next.js cookies storing on mobile, when it works just fine on desktop?
I've inherited working on a next.js app and have run into a quite frustrating scenario. After logging into the app, the session (iron-session) is stored in a cookie for authentication/session ...
313
votes
2
answers
204k
views
Sticky and NON-Sticky sessions
I want to know the difference between sticky- and non-sticky sessions. What I understood after reading from internet:
Sticky : only single session object will be there.
Non-sticky session : session ...