zquestz/omniauth-google-oauth2 — pull request #59 by GuilhermeSimoes (2013-06-17 15:05:26+00:00)
Title: Changed approval_prompt to prompt

The param `approval_prompt` only allowed 2 options and `prompt` has a lot more flexibility as you can see [here](https://developers.google.com/accounts/docs/OAuth2Login#authenticationuriparameters). Basically:

* `approval_prompt: 'force'` = `prompt: 'consent'`

* `approval_prompt: 'auto'` = not passing any value to `prompt`

And now there are a couple more options:

* `prompt: 'none'`: No authentication or consent pages will be displayed; it will return an error if the user is not already authenticated and has not pre-configured consent for the requested scopes. This can be used as a method to check for existing authentication and/or consent.

* `prompt: 'select_account'`: The user will always be prompted to select a user account. This allows a user who has multiple current account sessions to select one amongst them. Like this:

![gwlsa](https://f.cloud.github.com/assets/531168/662772/f35172ca-d75d-11e2-9d04-fbbdf0e02a89.png)

* `prompt: 'consent select_account'`: A combination of 2 previous options.

There are a couple issues with this pull request:

1. This gem's default value for `approval_prompt` used to `force` but according to the Google OAuth 2 spec, the default should be `auto`. So now with `prompt` I'm respecting that default.

2. The list of scopes is comma-separated and I left the list of prompt values space-separated. A bit inconsistent. The thing is, making it comma-separated only complicates the `authorize_params` function. And since in the Google OAuth 2 spec, the scope and prompt values are space-separated, maybe it would be better to separate the scopes by spaces? Tell me what you think.