use this gem.
https://github.com/jclusso/omniauth-linkedin-openid
this is not working properly
https://github.com/decioferreira/omniauth-linkedin-oauth2