Replies: 1 comment
-
Question 1 looks like an intended behavior. When you use login/logout session key get regenerated. What can you do: |
Beta Was this translation helpful? Give feedback.
-
Question 1 looks like an intended behavior. When you use login/logout session key get regenerated. What can you do: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using laravel/breeze. In my login function i'm putting user data in my session:
$request->session()->put('ORIGINAL_USER_ID', request()->user()->id);
My .env SESSION_LIFETIME is 1 (1 minute).
Problem: In my login form i'm selecting remember me then press submit. Now i have one session file in my storage with ORIGINAL_USER_ID parameter that i've saved when login. After one minute i'm still authorized but now i have no ORIGINAL_USER_ID in my current session. I watch my storage and now i have two session files.
Questions:
More information about project.
In my application users can create children account and then toggle between their accounts in their dashboard panel. Also users can sign in any child account by login form on the main page. When users toggle between their accounts I using Auth::loginUsingId($children_user_id, true) to change authorized user in session. Users don't need type password when they want to toggle between child accounts but I need know what account was authorized first(in login form on the main page). Can you tip me best way to realize this than I do?
Beta Was this translation helpful? Give feedback.
All reactions