From 61764498af90fd58b4813f47bd077b7172cd0b3b Mon Sep 17 00:00:00 2001 From: John Paton Date: Mon, 26 Sep 2022 16:43:43 +0200 Subject: [PATCH] Allow double quotes around stateToken Solves Versent/saml2aws#864 --- pkg/provider/okta/okta.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/provider/okta/okta.go b/pkg/provider/okta/okta.go index d3a119e27..7d8771782 100644 --- a/pkg/provider/okta/okta.go +++ b/pkg/provider/okta/okta.go @@ -592,7 +592,7 @@ func (oc *Client) follow(ctx context.Context, req *http.Request, loginDetails *c } func getStateTokenFromOktaPageBody(responseBody string) (string, error) { - re := regexp.MustCompile("var stateToken = '(.*)';") + re := regexp.MustCompile("var stateToken = [\"|'](.*)[\"|'];") match := re.FindStringSubmatch(responseBody) if len(match) < 2 { return "", errors.New("cannot find state token")