top | item 8388566

Ask HN: Authentication with Angular/Rails?

7 points| pastagami | 11 years ago | reply

I know there are many companies developing with Angular and Rails (and many looking to hire for this as well).

How are you managing authentication (securely)?

7 comments

order
[+] mtmail|11 years ago|reply
This sounds like a specific question how to solve a problem in one programming language. Wouldn't a question on stackoverflow be better?

(Afaik most Rails projects use https://github.com/plataformatec/devise/ which takes care of database setup, password hashes, session cookies, even forgot-password feature and Facebook/Twitter/Google+ logins.)

[+] pairing|11 years ago|reply
Angular and Rails are frameworks that leave the decision of authentication up to you.

You can do token authentication, basic authentication, OAuth, OAuth2, or even roll your own. For a rails api <-> angular combo, I usually stick to token or OAuth 1/2 authentication.

I have open sourced an angular application (technically ionic but it uses angular under the hood) and the rails api that it uses as a backend which uses token authentication. https://github.com/johnkelly/mojave https://github.com/johnkelly/kalahari

[+] orky56|11 years ago|reply
Are there any gems/methods that combine authentication along with multitenancy in a turnkey solution? (Devise + Apartment)