Always prompt user to select account on google login

This closes #103 and as discussed in that issue, hopefully fixes a
common source of error discussed in #31
This commit is contained in:
Thom Seddon 2020-05-12 13:42:58 +01:00
parent a668454a11
commit 60604ad3db
2 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,8 @@ func TestConfigDefaults(t *testing.T) {
assert.Equal(time.Second*time.Duration(43200), c.Lifetime)
assert.Equal("/_oauth", c.Path)
assert.Len(c.Whitelist, 0)
assert.Equal("select_account", c.Providers.Google.Prompt)
}
func TestConfigParseArgs(t *testing.T) {

View File

@ -13,7 +13,7 @@ type Google struct {
ClientID string `long:"client-id" env:"CLIENT_ID" description:"Client ID"`
ClientSecret string `long:"client-secret" env:"CLIENT_SECRET" description:"Client Secret" json:"-"`
Scope string
Prompt string `long:"prompt" env:"PROMPT" description:"Space separated list of OpenID prompt options"`
Prompt string `long:"prompt" env:"PROMPT" default:"select_account" description:"Space separated list of OpenID prompt options"`
LoginURL *url.URL
TokenURL *url.URL