Preserve params between omniauth req & callbacks
If you need to pass a param to omniauth callbacks so that you can maintain a certain state about the user signing in you can do the following:
In the url call to omniauth provider strategy add a querystring:
<a href="/users/auth/facebook?mobile=true">Sign In with Facebook</a>
Then to retrieve it on the callback url handler:
request.env['omniauth.params']['mobile']
Tweet