Better HN
topnewbestaskshowjobs
Log inSign up

hassox

6 karma · joined Oct 21, 2008 (18y ago) · 5 submissions

Submissions

comment 9y ago · link · parent

If you're generating the page from your rails server then the cookie that is set for sessions would be already available and you can make calls without worrying too much about authentication. If you want to use tokens or OAuth strategies there's a bit more to it but you should be able to find lots of information on it with a bit of googling. Here's an article that seems to cover the basics. https://technpol.wordpress.com/2013/09/23/angularjs-and-devi...

I'd usually google for a collection of the tools I'm looking at. To find that article I searched for "spa authentication with rails and devise"

Good luck with your side project :D

comment 9y ago · link · parent

Just to add to what Alex said. We also wouldn't expect you to be knowledgable on _all_ the tools we use. We have a very open team that's happy to help and mentor.

comment 9y ago · link · parent

Hi!

When we first started we used a pretty vanilla version of Devise. The angular application just used session based auth. The easiest way to get the MVP happening was to have Rails generate the landing page of the SPA so we got sessions for 'free'. As we started to add more options for authenticating to the application to handle micro-services and our mobile application we took advantage of Warden/Devise and implemented a custom strategy for handling JWT authentication in addition to the regular session based strategy that comes out of the box.

The JWT authentication is Guardian compatible since we use Guardian to drive Paladin. It was a relatively straight forward addition with Warden/Devise to provide authentication based on either strategy which allows us to take advantage of these different schemes with minimal updates to our core application.

comment 10y ago · link · parent

As an experiment I tried rendering elm in the server. It's renders fine but I'm not sure that it doesn't re-render everything on page load.

http://blog.overstuffedgorilla.com/server-side-elm-with-phoe...

comment 11y ago · link · parent

Ezra was an inspiration to me. My first ever OS contribution was to merb, and his was so helpful, it inspired me to keep going. It was great to work with him on that project, and later at Engineyard. So sorry to hear of his passing.