-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPDATE THE SESSION FROM THE CLIENT SIDE #6952
Comments
it's a bit of hack, but this seems to do the job:
then once you've updated your user data:
|
where will i put all these code? which file? |
ignore the code... after you update your username/name/whatever call this:
|
my problem is dat how can i pass the newly updated user data to the session. if i log out and log in back, it gets the newly updated data from d backend that is normal but how can i pass the new data to the session without logging out and logging in... that code u provided just reload the session not update d session THIS IS MY ISSUE |
this is where i got the code snippet from: |
See the related discussion here: #3941 Might have some good pointers. Unfortunately, the discussion got flooded by unrelated comments and I stopped iterating on the feature, but we could revisit and add something in the future. It would be nice to have a built-in solution, but updating the session makes little sense for JWT sessions for example, so we might need to think about the right API. |
Description 📓
I am working on a project, in the settings page i can update the name, username e.t.c after updating, it updates in the database but the session won't change until i log out and log in back then the new data from the database will now be updated. we need a way to update the session from the client when updates like this happen. the database is sending me the updated data after successful update. so we need a way to pass the updated data to the session from the client so that we did not need to log out and login again for the changes to be made
How to reproduce ☕️
no one for now
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
The text was updated successfully, but these errors were encountered: