Devise is great. It simplifies lots of tasks related to resource management: authentication, registration, confirmation, etc; and it does it in a clean and highly configurable way. But it is only this great if you are managing your resources locally. Devise has adapters only for models backed up with ActiveRecord or MongoId which means that if you’re using resources provided by an external webservice you can’t use Devise. But don’t despair. Extending Devise First of all we have to get a basic idea of how Devise authenticates your resources. This explanation might be a bit rough so I’m going to use the following diagram to ease the explanation (kudos to asischao for his help). A request to authenticate a resource is received in the Rails app and it matches a route generated by devise_for . The request is handled (by default) by the SessionsController , provided by Devise, which delegates the authentication to Warden Warden uses one of the strategies provided by Devise to determi...