Search code examples
ruby-on-railsdevisesingle-sign-onomniauthtumblr

Devise Tumblr Omniauth


There is a way for create users without email with Devise?

I'm creating a single sign-on with Tumblr, Omniauth and Devise When accept on Tumblr dialog, it returns:

NoMethodError in Users::OmniauthCallbacksController#tumblr
undefined method `email' for #<User:0x00007f8835e4e110>

Tumblr don't provide email from their users on the whole hash.


Solution

  • Solved!

    I used this devise: not requiring email

    Then, removing from user model :validatable and this two methods:

    def email_required?
      false
    end
    
    def email_changed?
      false
    end