Has anyone built their own authentication system?
1–10 of 26 posts
Re: Has anyone built their own authentication system?
#2You would either use something like Firebase Auth or the built-in one that comes with your framework of choice. Identity in .NET core for example.
On the topic of auth, and as an aside, wondering if anyone has used a UUID + API key combination to do auth instead of JWT/cookies?
Re: Has anyone built their own authentication system?
#3What language/framework are you using? Typically you would implement your own authentication for learning the nuts and bolts of auth, but never for a production/live system on the web. You would either use something like Firebase Auth or the built-in one that comes with your framework of choice. Identity in .NET core for example. On the topic of auth, and as an aside, wondering if anyone has used a UUID + API key com…
Re: Has anyone built their own authentication system?
#4What language/framework are you using? Typically you would implement your own authentication for learning the nuts and bolts of auth, but never for a production/live system on the web. You would either use something like Firebase Auth or the built-in one that comes with your framework of choice. Identity in .NET core for example. On the topic of auth, and as an aside, wondering if anyone has used a UUID + API key com…
ok, i was trying to do this for production. I am switching over to firebase but it's not working well with my client-server-architecture
Re: Has anyone built their own authentication system?
#5You should consider one of the many frameworks that handle this sort of thing for you (every language has them.)
It is unclear from your comment how you might be helped.
Re: Has anyone built their own authentication system?
#6What language/framework are you using? Typically you would implement your own authentication for learning the nuts and bolts of auth, but never for a production/live system on the web. You would either use something like Firebase Auth or the built-in one that comes with your framework of choice. Identity in .NET core for example. On the topic of auth, and as an aside, wondering if anyone has used a UUID + API key com…
Store users with an username/email and scrypt-encrypted password.
On login, pull the encrypted password where username = $1. Compare. If valid, create a session id (fill 16 bytes with a cryptographically secure random number generator and encode it), store it that in the db along the user_id and some expiration time.
You now have a session_id -> user_id mapping which can.
Re: Has anyone built their own authentication system?
#7Unless you are more experienced and smarter than average engineer working on a 3d party solution - you should build your own only for educational purposes.
Re: Has anyone built their own authentication system?
#8Personally I think the problem is we are being sold so many 'conveniences'/solutions these days. They want you to think you cannot safely do it yourself, and on top of that, often times it's actually more difficult just to learn how to use whatever API the convenience that's being sold to us, uses.
You are often better off learning what is really happening under the hood, and solving the actual problem, instead of trying to figure out whatever api/tool that is being sold to you as a convenience. EDIT: to clarify, if you are inexperienced: I recommend learning by implementing both session + JWT auth on a side project, before using hand-rolled solutions in production.
Re: Has anyone built their own authentication system?
#9Yes, several. This is going to be a controversial one... but it isn't nearly as difficult as people make it seem. You shouldn't roll your own crypto libraries, but storing a bcrypt hash of the users password in the database, and then creating a JWT and setting it in a cookie, or create a session table and store a UUID in the cookie as a key to the session table really isn't that difficult. Personally I think the prob…
Re: Has anyone built their own authentication system?
#10https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial...