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

set path to cookies #63

Closed
wants to merge 1 commit into from

Conversation

m2omou
Copy link

@m2omou m2omou commented Oct 30, 2014

#55 After a long search, I finally found why I always got logged out when trying to access a restricted page.

It look like that $cookieStore is setting the cookie according to the path. So I get duplicated auth_headers, and the browser for some reason keep the old one.

screen shot 2014-10-30 at 14 24 30

So I tried to set a path to the cookies, but unfortunately in the cookieStore documentation it's not possible, at least not yet.

So I have made some research to find an alternative way to do this. And find out this thread.

So to resolve that issue I used that module:

https://github.com/ivpusic/angular-cookie

By replacing :

$cookieStore.put(key, val)

with:

ipCookie(key, val, { path: '/' })

And now everything works great, I'm not able to reproduce that issue anymore.

@lynndylanhurley
Copy link
Owner

@m2omou - thanks so much for helping me debug this. I'll review this and merge ASAP.

@m2omou
Copy link
Author

m2omou commented Oct 30, 2014

you're welcome ! :)

2014-10-30 19:32 GMT+01:00 Lynn Dylan Hurley [email protected]:

@m2omou https://github.com/m2omou - thanks so much for helping me debug
this. I'll review this and merge ASAP.


Reply to this email directly or view it on GitHub
#63 (comment)
.

*Mourad Sabour *

@lynndylanhurley
Copy link
Owner

@m2omou - sorry for the delay. This PR has finally been merged. Please pull down version 0.0.24-beta6 and confirm that it still works for you.

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

Successfully merging this pull request may close these issues.

2 participants