I am using omniauth with LinkedIn as a provider. LinkedIn doesn't supply an email in info hash, so i cannot provide an email when create the user based on the information I get back.
Two related questions:
1) How can I adjust devise so that there isn't a requirement for :email as a validation? It doesn't appear to be set under the User model.
2) I do want to get the email information, however, so want to have email information requested before creating the User. How can I redirect to a page/wizard asking for email information and then come back to finish the user registration?
Take a look at the railscasts about omniauth: http://railscasts.com/episodes?utf8=%E2%9C%93&search=omniauth
The idea is the following:
redirect_to new_user_registration_url
build_resource(*args)
method, and if the omniauth data is present, use it to create the resource (User in your case)That way, after trying to login with linkedin, the user will be redirected to a form where he will be able to enter his email.
It's all explained in the railscast ;)