facebook - Rails API, Devise & Mobile App. -


i designing rails application consumed native mobile application. new rails , feel bit lost. want achieve following:
• users of mobile application should able login using facebook , invite friends.
• users should authorized in order call apis.

to secure apis (i have read many posts far), decided following:
• use devise gem on service side token_authenticatable authenticate client of api i.e. mobile app.

the workflow following:
• on client app: user logs-in using facebook , obtains valid token.
• on client app: facebook token sent service.
• on service: using fb graph make sure user real.
o if exist in db, generate token token api.
o else, add them db , generate token api.
in controllers, using before_filter :authenticate_user! seems authenticate user forever. questions:
• best way this?
• if api token intercepted? other users able make calls api using token?
articles, books, casts appreciated.

have gone through hartl tutorial? it's pretty full information. once have working regular rails app can research how make more api isn't hard. check out this railscast place start. while not free 1 month rails amazing content , if seeking serious web development, can't recommend them enough


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -