diff --git a/go.mod b/go.mod index bd96b24..2a41361 100644 --- a/go.mod +++ b/go.mod @@ -30,3 +30,5 @@ require ( golang.org/x/term v0.0.0-20210503060354-a79de5458b56 // indirect golang.org/x/text v0.3.3 // indirect ) + +replace github.com/go-rod/rod => github.com/luneo7/rod v0.101.9-0.20220131185440-7433d1ef4c0a diff --git a/go.sum b/go.sum index eeb6927..1ec32f2 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,6 @@ github.com/aws/smithy-go v1.8.1/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAm github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-rod/rod v0.101.8 h1:oV0O97uwjkCVyAP0hD6K6bBE8FUMIjs0dtF7l6kEBsU= -github.com/go-rod/rod v0.101.8/go.mod h1:N/zlT53CfSpq74nb6rOR0K8UF0SPUPBmzBnArrms+mY= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -38,6 +36,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kr/pty v1.1.4 h1:5Myjjh3JY/NaAi4IsUbHADytDyl1VE1Y9PXDlL+P/VQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/luneo7/rod v0.101.9-0.20220131185440-7433d1ef4c0a h1:1bhJWp1SldU3IjOojHlmbQfyxOPlRW35Qh5bXYdtCOk= +github.com/luneo7/rod v0.101.9-0.20220131185440-7433d1ef4c0a/go.mod h1:N/zlT53CfSpq74nb6rOR0K8UF0SPUPBmzBnArrms+mY= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= diff --git a/login.go b/login.go index a51978c..df9fb1b 100644 --- a/login.go +++ b/login.go @@ -411,14 +411,9 @@ func createLoginUrl(appIDUri string, tenantID string, assertionConsumerServiceUR } func performLogin(urlString string, noPrompt bool, defaultUserName string, defaultUserPassword *string, defaultOktaUserName *string, defaultOktaPassword *string) string { - var browser *rod.Browser + launcher.SetDefaultHosts([]launcher.Host{launcher.HostGoogle}) - if path, exists := launcher.LookPath(); exists { - u := launcher.New().Bin(path).MustLaunch() - browser = rod.New().ControlURL(u).MustConnect() - } else { - browser = rod.New().MustConnect() - } + browser := rod.New().MustConnect() defer browser.MustClose() router := browser.HijackRequests()