diff --git a/helpers/services/sso.go b/helpers/services/sso.go index 270e7b0c4..168b34a90 100644 --- a/helpers/services/sso.go +++ b/helpers/services/sso.go @@ -117,7 +117,7 @@ func AuthorizeScopes(cookie string, config OAuthConfig) (authCode string) { Expect(curl).To(Exit(0)) apiResponse := string(curl.Out.Contents()) - pattern := fmt.Sprintf(`%v\?code=([a-zA-Z0-9]+)`, regexp.QuoteMeta(config.RedirectUri)) + pattern := fmt.Sprintf(`%v\?code=([^&\r\n]+)`, regexp.QuoteMeta(config.RedirectUri)) regEx, _ := regexp.Compile(pattern) stringMatch := regEx.FindStringSubmatch(apiResponse)