Building an entire directory app is hard though. And you want it to be highly resilient, right?
What do you recommend?
What do you recommend?
Keycloak allows you to create any number of realms and any number of clients and users in them. But you need to be thoughtful as you scale up because as the number of entities grows, Keycloak slows down. When you log in as a superuser in the admin panel, even if you have only 1,500 realms, it will take a few minutes or even crash on timeout. Creating a new realm will take about 20 to 30 seconds. You need to change your logic and interaction with Keycloak.
[0]: https://www.redhat.com/architect/oauth-20-authentication-key...https://keycloak.discourse.group/t/maximum-limit-of-realms/8... has some details, though comments are 1-2 years old so may be out of date.
Other alternatives I've heard mentioned for self-hosting include:
* Ory
* Platform specific OSS (Devise for Rails, Passport/NextAuth for javascript, Spring Security for Java, etc)
* IdentityServer (may have to pay something now, not sure)
* Keycloak (as other comments have mentioned)
* Supertokens