Forum: Ruby on Rails Twitter omniauth login; email can't be blank

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8471d26e8d9c2c6b09286028b276d627?d=identicon&s=25 Soichi Ishida (soichi)
on 2012-12-16 02:22
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('registrations.new.prohibited'):
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.

Question:
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.

soichi
This topic is locked and can not be replied to.