jtpio / jupyter-open-studio-day-nyc-2024

Jupyter Open Studio Day, NYC, April 29th 2024
https://jtp.io/jupyter-open-studio-day-nyc-2024/demo.html
0 stars 0 forks source link

Examples of authorization in JupyterLite #1

Open jtpio opened 2 months ago

jtpio commented 2 months ago

cc @rpwagner

Logging this example here since this was discussed today, which might be useful for reference: https://github.com/jupyterlab-contrib/react-auth-google-example

jtpio commented 2 months ago
rpwagner commented 2 months ago

@jtpio thanks! I was able to get a basic example working (repo) for a Globus collection with the help of @jbottigliero. You need to log into Globus using Google or GitHub, then join a Globus Group, to test that. (Globus is a data management used a lot in the US research and education space that can provide HTTPS access.)

I think you're correct about the React+Google demo. Right now, the Globus JavaScript SDK doesn't support a pop-up window login flow like the Google client. When it does, that's probably the best way to manage Globus logins in JupyterLab, JupyterLite, Voila, Voice, etc. (the browser-based frontends to Jupyter). Otherwise you need a server extension to provide a known URL (specific path) for the callback.

@jbottigliero, let me know when you get a chance to tackle the pop-up flow handler and I'll adapt the React+Google example for Globus. Once the tokens are in the local storage, I'm pretty confident about being able to load data for a dashboard (either Voila or Voici). And then we can look browsing collections like the JupyterLab Git extension.