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

Get the cookie auth from the response #55

Open
camilosampedro opened this issue Jan 31, 2017 · 3 comments
Open

Get the cookie auth from the response #55

camilosampedro opened this issue Jan 31, 2017 · 3 comments

Comments

@camilosampedro
Copy link
Owner

Inside login.service.ts, after a correct login, check the existence of PLAY2AUTH cookie.

Actually it is getting the cookie and it is sending it to the server automatically as a default browser behavior, but the Angular2 code doesn't correctly know that it is logged in, it is only being checked that the response is a 200 and saving a token with localStorage.

@hristo-tanev
Copy link

Hey, I'd like to work on this issue :), but it is one of my very first times contributing, so I might need some help :)

@camilosampedro
Copy link
Owner Author

Thank you and you are very welcome to contribute!

One of the first steps is understanding how the authentication process is done for this particular application: It is used a token sent inside a cookie between server and client.

The main problem is that I could not understand why Angular2 is not aware of the existence of that cookie, even if it exists at run time. It is important because it is the main way to know it the user is logged in or not, to change its view.

As you are new to the project, it would be very great if you have some suggestions or advices. 😄

Feel free to ask anything you want, good day.

@hristo-tanev
Copy link

Thanks, will look into it and of course ask if anything is unclear :)

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

No branches or pull requests

2 participants