2 years ago
#12404

albajoin
JypterLab cannot Authenticate with Trino (PrestoSQL) using OAUTH2 Token
I am using Trino to connect to PrestoSQL for my organization in the manner below with python. The MFA authentication requires that I click a link to authenticate. The links usually look something like this: https://query.organization.com:6543/oauth2/token/initiate/b74d83f9e395e4c27d18b
Once I click the link, a JuypterLab window (screenshot below) opens, which requires me to enter my username and password. After I do that, it just keeps spinning eternally and never ends up connecting or going through. (I am using Trino jar jdbc-367, if it matters.)
This only happens in the desktop app version of JupyterLab. This does not happen in the web version of JupyterLab, nor does it happen in JupyterNotebook. On the web versions, when I click the link and enter my username/password, it allows me to connect and to proceed with my query. Is there any reason why JupyterLab desktop version cannot go through?
connect = trino.dbapi.connect(
host='query.org.com',
port=6543,
user='hsimpson',
catalog='cloud9',
http_scheme='https',
auth=trino.auth.OAuth2Authentication()
)
https://i.stack.imgur.com/29t8A.png
oauth-2.0
token
jupyter
trino
0 Answers
Your Answer