ueberauth / ueberauth_google

Google OAuth2 Strategy for Überauth.
MIT License
166 stars 85 forks source link

`default_scope` in README doesn't work #44

Closed egeersoz closed 6 years ago

egeersoz commented 6 years ago

My config:

config :ueberauth, Ueberauth,
  providers: [
    google: {Ueberauth.Strategy.Google, [default_scope: "emails profile plus.me", approval_prompt: "force", access_type: "offline"]}
  ]

Response from Google:

Error: invalid_scope

Some requested scopes were invalid. {valid=[https://www.googleapis.com/auth/userinfo.profile], invalid=[emails, plus.me]}
jcypret commented 6 years ago

@egeersoz I ran into this as well. The README specifies "emails" in default scopes, but should actually be "email" (singular). It's correct in the source code and the query param example: https://github.com/ueberauth/ueberauth_google/blob/3a7949fdc5a007c2a124aa0b6a5bd808688d9a68/lib/ueberauth/strategy/google.ex#L6

doomspork commented 6 years ago

@egeersoz or @jcypret, would you mind opening a PR to correct the README?