sapper-authentication-demo icon indicating copy to clipboard operation
sapper-authentication-demo copied to clipboard

Sessions not update dynamically

Open ghost opened this issue 5 years ago • 3 comments

Hi,

I can easily run the project in giant mode. There is no problem but the sessions are not updated when I run the project in build mode. When I log out and log in to another user type, old data remains on the screen. I need to refresh the page from chrome for the session update. By the way, I did not make the slightest change in the project.

My build process;

npm run build -> in main directory npm start -> in main directory

node server.js -> in backend/ directory.

ghost avatar Jun 26 '20 08:06 ghost

The logout method should refresh your browser for you, I think.

This is exactly how it should work, I don't do any dynamic modification of the session. However you can, if you would like to.

antony avatar Jun 26 '20 09:06 antony

Yes. Logout function works well. but login process not working properly. every time i must refresh by f5 on chrome.. Then new settings is processing but not refresh browser, old settings remain and some pages occur by old settings.

ghost avatar Jun 26 '20 20:06 ghost

Hello @antony and thank you for this demo repository! I am looking at the code after I watched your video. and did some modification (using a separate API server for auth).

I couldn't understand why on your video you could login and getting the profile without hitting F5, and then I read my code and yours again... You are using window.location while I was using the goto method...

Is there any other approach to get the profile from the cookie without refreshing the page?

fabiendeborde avatar Feb 06 '21 12:02 fabiendeborde