Skip to content

Commit

Permalink
Chrome authentication fix (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirajsanghvi authored Mar 30, 2024
1 parent f78d10a commit b33195a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ func NewSession() (*Session, error) {

func (s *Session) NewContext() (context.Context, context.CancelFunc) {
// Let's use as a base for allocator options (It implies Headless)
opts := append(chromedp.DefaultExecAllocatorOptions[:],
chromedp.DisableGPU,
chromedp.UserDataDir(s.profileDir),
)
opts := []chromedp.ExecAllocatorOption{
chromedp.NoFirstRun,
chromedp.NoDefaultBrowserCheck,
chromedp.UserDataDir(s.profileDir),
chromedp.Flag("enable-automation", true),
chromedp.Flag("disable-web-security", true),
chromedp.Flag("allow-running-insecure-content", true),
}

if !*headlessFlag {
// undo the three opts in chromedp.Headless() which is included in DefaultExecAllocatorOptions
Expand Down

0 comments on commit b33195a

Please sign in to comment.