This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-27
Channels
(ns user
(:require [etaoin.api :as e]))
(def driver (e/firefox))
(e/go driver "")
(def saved-cookies (e/get-cookies driver))
(def driver1 (e/firefox))
;; got error here
(for [cookie saved-cookies]
(e/set-cookie driver1 cookie))
(e/go driver1 "")
Hi. Trying to preload saved cookies and got this error
":error "invalid cookie domain",
:message "Cookies may only be set for the current domain"
what's the right way to do this?Ok so the problem is that user got redirected to http://auth.xyz.com first if not authenticated already. the solution is to save the cookies before http://auth.xyz.com redirects back to http://xyz.com then visit http://xyz.com, load the saved cookies and visit http://xyz.com again.
Was just about to have a peek at this @UP82LQR9N and saw that you figured it out. Thanks for sharing your findings, they will surely help someone else in the same boat.