44,237 questions
Best practices
1
vote
0
replies
29
views
Where should I create the application session when using an internal SSO (Gin + OAuth2)?
I’m integrating an internal SSO (OAuth2) into a web application using Gin (Go), and I’m a bit unsure about the right place to create the application session.
The SSO is the only authentication ...
0
votes
0
answers
67
views
.NET 8.0 getting session and authorization working together
I am having problems understanding how to get .NET 8.0 session and authorization working together.
Most of my controllers are decorated with the Authorize attribute, and I am accessing session ...
0
votes
0
answers
44
views
Users getting 401 "Unauthorized" error after direct database credential/session deletion - Keycloak 26.3.0
Environment
Keycloak Version: 26.3.0
Deployment: Kubernetes (multiple pods)
Database: Oracle
Issue: Persistent 401 errors after database manipulation
Error message screen
Problem Description
After ...
0
votes
2
answers
135
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 ...
3
votes
0
answers
155
views
Problem with multi-dimensional session variable in PHP [closed]
I have been trying to build a shopping cart with PHP and MySQL as a learning experiment. I am stuck at passing the ordered items from catalogue to the shopping cart.
After many experiments I figured ...
0
votes
1
answer
60
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 ...
0
votes
0
answers
105
views
How to recognize a user even after clearing cache and data?
I'd like to implement a system that allows recognizing a user even after the app's cache and data have been cleared from the system settings, as X (Twitter) appears to do.
However, I can't figure out ...
-1
votes
1
answer
71
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
84
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
62
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
101
views
gin-contrib/sessions creating new session for every request
I'm trying to use gin-contrib/sessions but every time I make a request to the server a new session is created. It is never finding a previously created session and I can't access any data that should ...
0
votes
0
answers
59
views
How to suppress redundant update in Hibernate when insert + update happen in same transaction (trigger firing twice)?
In my Jakarta EE application (EJB + JPA with Hibernate), I have the following scenario:
A Contact entity is created (INSERT).
Immediately after creation, for some business reason, the same entity is ...
0
votes
0
answers
61
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 ...
1
vote
1
answer
112
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'])...
0
votes
1
answer
169
views
Prevent session collision / override from cross-site requests when using SameSite=lax
I am using session ids to enable various features for logged and unlogged users on my website. This include matching the csrf token to the session id.
I store the session id as a SameSite=lax cookie.
...