Why Nile Auth?
Purpose-built for multi-tenant apps
Nile re-engineers Postgres to make it easy to build and scale B2B apps. Our Auth product is also designed from the ground up to support multi-tenant applications on top of Nile’s Postgres.


Unlimited active users
One of our key focuses in developing Nile Auth was to offer the ability to support unlimited active users. Traditionally, authentication providers set a fixed limit on the number of active users, often requiring additional payments as you scale up. However, with Nile Auth, there are no extra charges for active users. You will only pay for the PostgreSQL database, allowing you to store and scale to an unlimited number of active users without incurring additional costs.Customer and user data stored in your DB
One of the challenges we have faced with third-party auth providers is that user and customer data are locked in behind third-party APIs. There are a few issues with this approach- Referencing and joining user data with other tables in your database. It gets hard to refer to the user data using foreign key constraints or SQL joins to query across user and other business tables.
- The synchronization process is async and poses consistency challenges. You could synchronize using a webhook or capture events into a changelog and apply them to the primary DB. Both approaches eventually create consistency problems. If other tables reference your application’s customer or user data, users will face weird delays or could even lose data.



Comprehensive B2B auth features
Access a full suite of authentication features to secure your application thoroughly. Here are some of the features you get out of the box:- Organization management
- User profiles
- Dashboard for managing users and organizations
- Tenant over-rides - manage authentication for each tenant individually.
- Multi-framework support - NextJS, Express, React, etc.
- Wide range of authentication methods - email/password, social login, magic link, etc.
- UI components for embedding in your application - simple, beautiful, and flexible
- Cookie-Based Authentication: Secure session management using HTTP-only cookies.
- JWT and Session Support: Uses cookies to maintain user sessions and optionally issues JWTs for client-side validation.
- Single Sign-On (SSO) Support: Optional integration with external identity providers.

Self-host or let Nile manage it
One of our design goals was to make it easy to self-host Nile Auth. We believe we have made it easy for developers to use our managed solution or self-host the auth service. The auth service will still use hosted Nile’s Postgres, but one can get the benefit of running core security logic within their account in the cloud. For development purposes, the entire Nile stack, including Postgres and Nile Auth, is available as a docker image. Developers can test locally and use the hosted offering when deploying to production.
Drop-in fully customizable auth UI modules
Easily integrate pre-built authentication UI modules into your application in five minutes. Add support for Google, GitHub, and more and override per-tenant. Nile’s open-source SDK includes beautiful and flexible React components that can be embedded in your application and customized to your liking. This includes the signup, login, organization switcher, user profile, social login buttons, and more.

Design principles of Nile Auth
Support multiple languages
To truly democratize B2B authentication, we wanted to build a solution that can be leveraged with as many languages as possible. We currently support the Typescript/Javascript ecosystem but plan to support more languages. We have published our public Auth APIs and hope to provide more language coverage. We would also love the community to build and contribute SDKs for their favorite language.Auth as a service vs a library
Auth solutions have been tackled as a service and as a library. Based on our experience, a service-first approach is the most secure solution for B2B Authentication for several reasons.- Libraries are convenient till the new CISO in a B2B company mandates that auth has to be moved to a service for security reasons. Having the auth logic across many services is usually not what CISOs want. Security teams prefer to control the authentication logic centrally.
- Security hotfixes are a nightmare with thick clients. When a security hole is identified, it becomes critical for B2B companies to deploy the fix immediately. It is much easier to hotfix the central service vs upgrading the library in multiple services.
- In most cases, B2B Companies need to support multiple languages from the start. For example, companies build their data plane with Typescript but their control plane using Go. Users will authenticate against both the control plane and the data plane.