I have to run some code (subscription to an external mailing list) when a new user is created with OmniAuth (any strategy). The setup is pretty much identical to Ryan Bates' screencast:
http://railscasts.com/episodes/241-simple-omniauth?view=asciicast
So far I haven't found a suitable point to hook in the code in the middleware. And when control is returned to the Rails level, the data is passed as user = User.from_omniauth(env["omniauth.auth"])
and nothing indicates whether the user has just been created or not.
A workaround could be a flag on the user which defaults to false and is set to true in session#create. But there has to be a better way, hasn't there? :-)
Thanks for your hints!