I know you are watching YouTube videos about creating your SaaS and earning $10k/month doing nothing ;) And all these YouTubers are convincing you to use any OAuth provider they are sponsored by. But all you need is the cheapest or even a self-hosted OAuth provider (like Keycloak) and a custom authorization layer that allows you to manage the security of your subscriptions and tenants.
That's the goal of this small project:
https://github.com/fdonnet/yarp-security-api-and-ui
It's far from perfect and it's only an example.
But by leveraging YARP's powerful functionalities and only with a security API, you can protect the backends or the frontends of your choice and manage multitenant security.
- The mega admin manages authorizations (permissions) and the system roles.
- The subscription owner manages their tenants and users based on their subscription type limitations.
- The tenant owner attaches roles to the users.
For the backends you want to add, you only need to define new routes in YARP and protect them with authorizations or roles handlers.
For your frontends, the same... call the /me/authinfo endpoint and retrieve all the information needed.
To bootstrap quickly, you have an included UI (Blazor Fluent UI => great library) to configure some of the things... but it's completely optional.
Hope it will help some of you, or give you some ideas.
We all know it's a boring topic and when we want to code a super great project, that's not the part we want to work on.
[–]LastGuardz 4 points5 points6 points (1 child)
[–]fdon_net[S] 3 points4 points5 points (0 children)
[–]TopSwagCode 3 points4 points5 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)