Twitter omniauth login; email can't be blank

Rails 3.1.3
devise 2.1.2
omniauth-twitter (0.0.14)

I am trying to setup Twitter omniauth login.
But Twitter API does not return email from its server, so I need to pass
email from somewhere.

Since my app already has its own login process, which requires users to
input email and to proceed to confirmation, getting email from there
seems reasonable.

Currently, if users try to login using Twitter account directly (without
the account that the app can create), it raises an error

1 error t(‘’):
Email can’t be blank

Twitter API returns ‘nickname’ , which is filled in the username field
along with the error above.

If I try to fill the email field below the username field and click sign
up, it raises the same error, having the email field emptied.

Devise controller is hidden somewhere, I need to override it somehow in
order to pass emails from input form.

Could anyone show me how to pass email to devise controller in case of
Twitter omniauth login?
If there is a better way, it will be nice.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs