So I've got a Rail application that is being served up a via Apache/SQL. 
The main website sits are www.railswebsite.com but also serves up flat data 
as JSON through its API. Now I want to set up an Angular app that lives on 
the same domain at www.railswebsite.com/angular/

My question is, would it be possible to just send the user to the rails app 
login page to set the cookie, redirect them to the angular app, and then 
just read the cookie within the Angular app to authenticate?

If so, is there an easy method for checking if a logged in state is set via 
the cookie and then using the ID to call the JSON file from the rails API I 
have set up?

I'm very green to Angular so I'm not really sure what the best approach 
would be or if something like this would even be possible. I figured using 
the already set cookie from the rails app would makes things a lot easier 
since I'm on the same domain already. 

I've seen this post over at 
stack<http://stackoverflow.com/questions/17982868/angularjs-best-practice-for-ensure-user-is-logged-in-or-out-using-cookiestore>
 which 
seems to be close to what I need, but I honestly don't even know where to 
start.  I've read about 15 different articles on Auth for angular, but they 
all seem to be over complicated compared to what I'm trying to do.  Does 
anyone have the time to talk to me like I'm a 3 year old.  I know generally 
speaking that hand holding is frowned upon, but I'm all for paying my way 
if need be.  Thanks again for a fantastic frame work and community.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to