Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure. Basically the user is on site A and presses a link that opens a pop up from our site. The pop up logs him in, either through oAuth or a local login. Then site A should get the user details back.

EasyXDM works with iframes, not with popups, so the only option we had (well, the one I thought about) was sending a request to the server every few ms to check if the user logged in. That's pretty horrible. We needed continuous updates from site A to our site so we decided to use socket.io. Sockets don't have sessions, so we listen to a random channel name, and pass that channel name to the popup, which sends the user details as a message to that channel.

That's still complicated. I'm still not sure it's the right approach. And I'm not an expert. But it works for now.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: