zquestz/omniauth-google-oauth2 — pull request #38 by jvatic (2012-10-27 23:53:22+00:00)
Title: Fix: don't request userinfo unless proper scope present

When overriding the scope option to not include `userinfo.profile` or `userinfo.email`, the strategy attempts to request the userinfo anyways causing an `OAuth2:Error: Invalid Credentials`. This patch checks the scope before attempting to request the userinfo fixing the issue.