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.)
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 use cookie based authentication, like houndci.com https://github.com/thoughtbot/hound
I think token based authentication (rails-api) is better, but most of my technical background is rails.
[+] [-] mtmail|11 years ago|reply
(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
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
[+] [-] kdlmm|11 years ago|reply
Disclaimer: I'm the author.
[+] [-] sanemat|11 years ago|reply
[+] [-] joshschreuder|11 years ago|reply
[+] [-] tehwebguy|11 years ago|reply
[+] [-] orky56|11 years ago|reply