This FastAPI app demonstrates implementing OAuth flow to Auth0, and using the logged-in-User JWT to make API calls to Noteable, and connect to Notebooks in realtime.
git clone https://github.com/noteable-io/oauth_origami_demo.gitpoetry installpoetry run uvicorn app.main:app --debug
You'll need to update app/settings.py with the appropriate Auth0 settings and create a .env file with the Auth0 Client ID and Client Secret.
- Navigate to
http://localhost:8000to see an endpoint that doesn't require Auth0 login. - Navigate to
http://localhost:8000/meto force an Auth0 login and see the logged in users info. - Navigate to
http://localhost:8000/project_fileswith optional url argumentproject_idto list files in a project. With no param, default to the ChatGPT plugin default project. - Navigate to
http://localhost:8000/notebook/{file-id}to connect to a Notebook in realtime and see the Notebook model output. - Navigate to
http://localhost:8000/run_all/{file-id}to execut eall cells in a Notebook and see the modeled Notebook afterwards.