This is an extremely simply identity provider module for Livebook when running Livebook behind a reverse proxy with forwarded authentication, such as when using Tailscale. For more information, see https://github.com/tailscale/tailscale/tree/main/cmd/nginx-auth and https://caddyserver.com/docs/caddyfile/directives/forward_auth#tailscale.
To use this, just stick webauth.exs
in /app/user/extensions
or, if using a Docker container for Livebook, stick it somewhere else and mount it into the Docker container via -v /path/to/webauth.exs:/app/user/extensions/webauth.exs:ro
. Then, just set LIVEBOOK_IDENTITY_PROVIDER=custom:Webauth
when running the Livebook server.