-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More clarity on how this app should be used for to provide authentication for a startup business using Elixir/Phoenix #149
Comments
Hi @tadasajon 👋 A bit of back-story: we have built several client (consulting) Phoenix Apps that include bespoke authentication systems. It's a painful waste-of-time to keep re-building the same (or similar) auth systems each time. So we decided to abstract it. Initially we thought the Your understanding of how to use As for the GPL license, it's the same one used for Linux and Wordpress https://wordpress.org/about/license/ Hope that helps. |
I've asked this question on ElixirForum.com https://elixirforum.com/t/solving-auth-once-and-for-all-does-this-proposed-solution-make-sense/44143 -- I'm interested in identifying my blindspots and misunderstandings. |
Hi @tadasajon, I don't think you're going to get particularly positive feedback on Elixir Forum on what we have built here. Especially now that I guarantee you that people will find faults with what we have implemented here. Especially people who have never had to manage multiple (client) apps and therefore won't have felt the pain of updating those Apps which may all have slightly different implementations/naming/etc. 🙄 I wish people with strong opinions on Auth would open issues (the way you have) so that we can discuss & improve. As stated above, for our use case, we prefer to have separation of concerns so that our business logic can be as simple as possible. This is essentially a basic (Open Source) implementation of an "Auth-as-a-Service" product like
If you read the A good example of why having Multitenancy ?For the uninitiated, read the Wikipedia summary: https://en.wikipedia.org/wiki/Multitenancy#Complexity We have built/worked on multitenanted Apps several times before. In an When a In fact, now that we have The only thing we're not currently doing is distinct passwords/passphrases per App, that's beyond our use case.
With a service like Fly.io running an instance of the |
@nelsonic thanks for the extremely useful insight you added. I'm going to try to get your auth app running again. I'm kind of surprised that this isn't the default way that doing auth is understood since it seems like the slightly higher price in complexity upfront will pay off hundreds of times over. |
@nelsonic I'd be curious what you think about taking an approach like Firebase or Supabase for authentication. |
@tadasajon I cannot resist answering questions. They help me to think critically about how I build things. So thanks! 🙌 Very good follow-up questions. ❓
Supabase 🦸We're delighted that Supabase exists and they are tackling the "Open Source Firebase" challenge. 🎉 We've been following them since their initial announcement last year on HackerNews: What do I do with an error like this? 🤷♂️ https://app.supabase.io/ ... where do I even start to debug it? I know some people using it in The fairly major "red flag" 🚩 that has stopped me form experimenting with Supabase is their lack of testing. If you read through the The integration tests are 64 lines of TypeScript code: You can skim through the tests in 2 mins and make up your mind how reliable you think it will be. 💭 Firebase 🔥As for Firebase it's a good product that locks you tightly into the Google Cloud ecosystem. We've read some horror stories on HN of people having their GCP account locked/blocked and being locked out for days until they were able to leverage Twitter/HN to get their account unblocked ... GCP is not run by Humans, it's AI! 🤖 Please, don't take my word for this, read these posts that have thousands of "votes" from devs:
Make up your own mind how much you want to trust your company/app to Google.
The mega companies that spend millions a month on GCP and feature in the "success stories", A small startup has to deal with GCP's automated support system. i.e. Again, any system is good when it works reliably. tl;dr > pick the Auth system that meets your needs. 🔍FWIW: we really didn't want to build an Auth system ... 🙄 Our goal with this project is something very different from what others are building. Our plan is akin the Japanese family-companies that have 100 Year business plans: https://www.bbc.com/worklife/article/20200211-why-are-so-many-old-companies-in-japan The way that influences our decisions is simple: we don't use any tech that we cannot run ourselves independently. Let us know what you decide. 👍 |
@nelsonic thanks for a thoughtful response. I guess we're still undecided on how we're going to handle auth. It seems like we may be able to use Firebase auth from an otherwise Phoenix/Elixir ecosystem. Supabase seems like it may be too much of a moving target for us. It seems clear to me that once one has begun thinking in terms of managing two phoenix apps that both need to do user authentication and authorization, then one may as well be thinking in terms of managing fifty such apps. So it should be possible for someone to set up a Phoenix app with auth-as-a-service that provides user authentication and role-based authorization for all the other Phoenix apps that they may create. It seems to me that this Then anyone who wanted to deploy a Phoenix app on Fly.io infrastructure and needed to think about user login could just clone this project and run the deploy scripts with the appropriate account credentials. I guess since this is open source work there is nothing to stop me from trying to pull these projects together into a package that can be easily deployed on Fly, so maybe that's what I'll start fiddling with. |
I'd be curious to compare your offering to KeyCloak, as well. KeyCloak seems to be a fairly widely used java implementation of what you've tried to build in this I'm writing my main apps in Phoenix, but does that mean I should also use an auth system written in Elixir? Isn't all the interaction between them going to be over OAuth protocols that are agnostic as to the underlying tech stacks? I can't stand working in Java, and KeyCloak is written in Java, but it seems to me that I'd mainly be administering an underlying application, not really working directly in Java. So it seems like the real concerns should be how easy it is to administer the app. I suppose if I used this My main concern is that the entire area of authentication is rather sensitive and it's a good idea to get it correct and not have security holes or other problems down the road. If, by chance, the purpose for which I'm building all this takes off, and I'm managing millions of users accounts and working at a multi-million dollar production scale, then how well will the underlying auth package and deployment system hold up? And will I be able to get out of pickles? |
I'm building a phoenix app and I'm interested in a user login system. I will need to connect with my users' Google.com accounts and Telegram.org accounts, so I need something that gives me a bit more power that
phx.gen.auth
(which I also don't like because it clutters up my codebase).It is taking me a long time to understand how I would use this package to provide authentication for my app, however -- this is not a library that I can add to my app's
mix.exs
file, for instance.What I have gathered so far is that I will need to run two phoenix apps: my own app that I am interested in providing authentication for, and also this app, which will have to be deployed at another domain, perhaps auth.tadasajon.com if my app is running at tadasajon.com.
What I will then have is essentially an OAuth login system that I will use from my own phoenix app, and that potentially other websites can use as well if they would like their users to be able to login with their tadasajon.com accounts for some reason.
The way my Tadasajon.com app will use this app is through the
auth_plug
library, which I will add to mymix.exs
file in my Tadasajon app.Do I understand this correctly so far?
Also, I noticed that this codebase is under the GNU General Public License v2.0 -- I am not building free software, however. I'm just building a website that people are going to log in to and then pay me money so my partner and I can make a million dollars. It is not my intention to distribute the software I am building or to make it open source -- I only intend to provide a service to users who want to buy widgets. So I just want to be sure that this licensing does not require me to forsake making any money and also does not require all the code that I write to be open source.
Thanks!
The text was updated successfully, but these errors were encountered: