millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

support jupyterhub access token #694

Closed luogni closed 4 years ago

luogni commented 4 years ago

I'm trying to setup ein to connect to a remote jupyterhub instance using oauth authentication. I don't want to register using ein, I just want to create a token on jupyterhub and then use the token from emacs.

These are for example the configuration steps for visual studio: https://blog.jupyter.org/connect-to-a-jupyterhub-from-visual-studio-code-ed7ed3a31bcb

The general idea is to append "?token=YOURTOKEN" to api urls and don't ask for username/password. Is this possible with ein? I tried to add this parameter in the url but ein is appending /api and the url breaks.

dickmao commented 4 years ago

~The last time I looked into jupyterhub support I was stymied by sparse documentation. Perhaps that has changed, but I won't pursue it. I'll add it to Projects in the unrealistic hope that its mention there might deter future users like yourself from raising a new issue about it.~

costrouc commented 3 years ago

@dickmao I am heavily involved with jupyterhub. Like @luogni mentioned you can either append a ?token=TOKEN to each url or add Authorization: token TOKEN to each request. I would like to contribute this feature since we do many deployments of jupyterhub on digital ocean/aws/gcp.

dickmao commented 3 years ago

The single-user server needs to be launched from the browser. Then follow README instructions for jupyterhub.