-
Notifications
You must be signed in to change notification settings - Fork 227
Connecting after authentication #64
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
Comments
Without knowing how your authentication works, I can't offer any definitive advice. I'm assuming you have some sort of server-side flow that sets cookies as a response back from the server which is why you need to refresh. As far as |
That is actually quite helpful, and yes that is exactly correct. I set some cookies based on the response from the server. How would I go about invoking the |
One option is to use |
Great thanks! I'll give these a try. |
I ended up creating a promise in my socket factory that resolves after authentication when it receives an event broadcast from the auth service. Seems to be working good so far. |
Here's an example: https://gist.github.com/jrthib/4ce016449a29811d71b5. I hope this helps! On Jul 16, 2014, at 6:59 PM, Dadocat notifications@github.com wrote:
|
Like it is said here : https://github.com/rakeshok/socket.io-client-cookie |
I have an angular app with a login form. Once authenticated my auth service will forward to the inner protected state of the Angular app. Within this, I would like to have the web socket open it's connection. Currently to achieve this I have to refresh the page after authenticating, then the socket connection occurs.
Do you have any recommendations on how to achieve this?
The text was updated successfully, but these errors were encountered: