How about using something along the lines of:

```ruby
required_attrs = { provider: omniauth.provider, uid: omniauth.uid, name: omniauth.info.name, email: omniauth.info.email }
user = User.where(required_attrs).first_or_initialize
```