heul commented on issue #14330:
URL: https://github.com/apache/superset/issues/14330#issuecomment-885656343
@dpgaspar , thanks for the hint. It might even suffice to overwrite the
webdriver auth function (defined by **WEBDRIVER_AUTH_FUNC**). We use Azure as
OAuth provider and any /login request is redirected there and then selenium
times out. Works perfectly, when we added this to our **superset_config.py**:
```
from superset.utils.urls import headless_url
from superset.utils.machine_auth import MachineAuthProvider
def auth_driver(driver, user):
# Setting cookies requires doing a request first, but /login is
redirected to oauth provider, and stuck there.
driver.get(headless_url("/doesnotexist"))
cookies = MachineAuthProvider.get_auth_cookies(user)
for cookie_name, cookie_val in cookies.items():
driver.add_cookie(dict(name=cookie_name, value=cookie_val))
return driver
WEBDRIVER_AUTH_FUNC = auth_driver
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]