-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fails to load current session on redirect #1
Comments
Minor update: seems to work fine with a "normal" redirect. |
Could you share the |
Definitely!
|
I am having the same problem. Can I help in any way |
It looks like you’re not calling the |
I am also having this issue. When I do a live_redirect to another live view, the session map in the mount callback for the view is not updated yet. Only when I do a refresh of the page, the new session is provided to the mount callback in the view. Let me know if there is anything I can do to help, and great job on the library by the way. |
I'm having the same issue as well, even when calling |
This is my workaround:
|
I've faced the same issue. So the solution is invoking redirect/2 right after the PhoenixLiveSession.put_session/3. |
I'm very new to using Phoenix LiveView, so take this with a large grain of salt. I have Live Sessions working (super easy—thank you!), but they appear to not provide the current session when using push_redirect. The session available in the destination LiveView appears to be the default values until the page is refreshed to force a full request made which then loads the session values (including the "user_id" added from the previous page). Is there some other mechanism I should be utilizing when navigating across LiveViews to ensure the session is available?
Example of session from redirect:
And then as it's populated following the page reload:
The text was updated successfully, but these errors were encountered: