Skip to content
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

User cookie undefined when cached content is used #6

Open
neagle opened this issue Jan 30, 2015 · 0 comments
Open

User cookie undefined when cached content is used #6

neagle opened this issue Jan 30, 2015 · 0 comments

Comments

@neagle
Copy link

neagle commented Jan 30, 2015

I relied heavily on this boilerplate project to set up my first Angular/Express app: thank you!

I've run into a problem on my project where sometimes I'll go to a page and my app things I'm not logged in, though I have an active session. If I reload the page, it immediately thinks I'm logged in again. I was able to stumble onto consistent reproduction steps today, and they work on this repo out of the box, with no modifications other than a console.log one line 5 of app/scripts/services/Auth.js.

login-problem

To reproduce the issue, log in, then go to a page outside the app. Then use your browser's back button to return to your app. You'll find the user cookie is undefined, and the app thinks you're not logged in. If you reload the page, things are fine.

This is because the cookie that gets set here isn't actually being called.

I'm going to try to solve this problem on my own, now, but I wanted to let you know about it and get the thoughts of a wiser mind than my own on the best way to fix it. I don't fully understand the reason for removing the cookie and getting it reset each time.

Please let me know if I can provide any more details, and thanks again for making this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant