diff --git a/internal/webserver/authentication/oauth/Oauth.go b/internal/webserver/authentication/oauth/Oauth.go index 93551d8b..0134dc9d 100644 --- a/internal/webserver/authentication/oauth/Oauth.go +++ b/internal/webserver/authentication/oauth/Oauth.go @@ -53,7 +53,7 @@ func initLogin(w http.ResponseWriter, r *http.Request, showConsentScreen bool) { setCallbackCookie(w, state) prompt := "none" if showConsentScreen { - prompt = "consent" + prompt = "login" } http.Redirect(w, r, config.AuthCodeURL(state)+"&prompt="+prompt, http.StatusFound) } diff --git a/internal/webserver/authentication/oauth/Oauth_test.go b/internal/webserver/authentication/oauth/Oauth_test.go index d72d7fe2..2f583e1f 100644 --- a/internal/webserver/authentication/oauth/Oauth_test.go +++ b/internal/webserver/authentication/oauth/Oauth_test.go @@ -241,7 +241,7 @@ func TestHandlerLogin(t *testing.T) { test.IsEqualInt(t, rr.Code, http.StatusFound) location := rr.Header().Get("Location") test.IsNotEmpty(t, location) - test.IsEqualBool(t, containsString(location, "prompt=consent"), true) + test.IsEqualBool(t, containsString(location, "prompt=login, true) test.IsEqualBool(t, len(rr.Result().Cookies()) > 0, true) }) } @@ -273,7 +273,7 @@ func TestHandlerCallback_LoginRequired(t *testing.T) { // Should re-initiate login with consent test.IsEqualInt(t, rr.Code, http.StatusFound) - test.IsEqualBool(t, containsString(rr.Header().Get("Location"), "prompt=consent"), true) + test.IsEqualBool(t, containsString(rr.Header().Get("Location"), "prompt=login, true) }) } }