1

I've a Rails app and now I'm building a phonegap app for mobiles.

My idea is create an API in my Rails app and the mobile app will be able read the json responses of my api controllers like in the #350 RailsCast tutorial:

http://railscasts.com/episodes/350-rest-api-versioning

In the Rails app, I've users, and they can register and login with Devise gem. For securing my API I read the #352 RailsCast tutorial:

http://railscasts.com/episodes/352-securing-an-api?view=asciicast

My question is if is possible securing my API somehow with Devise, because I want my users will be able register or login through phonegap app and if they log in the app successfully, they will be able read the json responses.

Someone knows tutorials about this?

Is better using also Oauth2 or only with Devise gem is possible?

thanks.

Kirti Thorat
  • 52,578
  • 9
  • 101
  • 108
user1364684
  • 800
  • 2
  • 8
  • 28
  • Check out [this answer to some other question on SO](http://stackoverflow.com/questions/18605294/is-devises-token-authenticatable-secure/18695244#18695244). – Ashitaka Mar 16 '14 at 00:20

1 Answers1

0

Here is a tutorioal of Google calendar with nice Omniauth 2.0 issues

http://blog.baugues.com/google-calendar-api-oauth2-and-ruby-on-rails

lx00st
  • 1,566
  • 9
  • 17