I’m new to Elixir Livebooks, and I wonder if there’s a way to authenticate users beyond just using passwords. For example, let’s say I want to build an app where users log in and can only see their data, like working hours. Would it be possible to implement user-based authentication in a Livebook for such use cases, or would it be more appropriate to use a Phoenix application instead?
In case you use already use a proxy like Cloudflare, Google IAP, Tailscale, you could configure LIVEBOOK_IDENTITY_PROVIDER
and in the app you would have access to the verified user email, so you could then query the database based on that and show them relevant information.
Otherwise, you could use kino frame and forms for sign in and rendering information, though the sign in wouldn’t be persisted across page refreshes. So it mostly depends on where the sign in information comes from and the overall scope of the application. If you want to build a whole auth system with sign ups, then a Phoenix app will be a better fit.
Thank you for clarifying! I’m curious—are there any plans to offer a complete authentication system?
@MikaelFangel we have plans to add more auth options, such as authenticating access to Livebook via Livebook Teams and certain OAuth providers. However, if you are asking if a single Livebook App would offer functionality such as sign up and auth management, then no, and you should go for a full Phoenix app.
The core use case for Livebook Apps is for internal tools, and since it runs in your infrastructure, the users would already be authenticated using some auth proxy or similar.