0

Need some high level advice before putting the pieces of an app together..

I'm not entirely sure how these three pieces should fit together.

My understanding:

I have the user log in using omniauth and get redirected to a callback, where I can get information provided by the API and use it to build a user in the database. Then, I use warden to "store" the user, and authenticate whether actions are valid or not.

  • It looks as if I'll have to create my own "strategy" for warden?

  • How should I store the user's identity?

minikomi
  • 8,363
  • 3
  • 44
  • 51
  • FYI At the end of Ryan Bates' Railcast 304 on Omniauth Identity http://railscasts.com/episodes/304-omniauth-identity he says he's done a screencast on using it with Warden, but only if you have the "pro" subscription. – ian Jun 06 '12 at 12:28

1 Answers1

2

Somebody's already done the hard work for you. On github: https://github.com/hassox/warden_omniauth

thomasfedb
  • 5,990
  • 2
  • 37
  • 65
  • A quick note for anyone else who may be using this when writing controllers and then trying to write tests using mock users fromm warden - this creates a current_user with all keys as symbols, but the warden test helper casts all keys to strings. I ended up modifying the gem for my own use but if you prefer keys as symbols you'll need to work around it in your tests! – minikomi Sep 30 '11 at 02:54
  • You should also be aware that the gem has not been updated to work with >= v1.0 of Omniauth, which means you'll need to fork it and update it. I'm reviewing the code now so perhaps you'll see a pull request and update soon...? – ian Jun 06 '12 at 12:24