DEV Community

Deepak Kumar
Deepak Kumar

Posted on

User authentication system, from scratch?

I am building a social network. Is it better to implement my own user authentication or use 3rd party authentication services? I want to build this without the use of a paid 3rd-party.

Top comments (6)

Collapse
 
dealloc profile image
Wannes Gennar

If you're rolling your own authentication system, at least use one of the many libraries out there that are properly reviewed etc.
Rolling your own authentication from scratch is generally a bad idea unless you really know what you're doing (there's more pitfalls to it then you'd think)

Collapse
 
oggo profile image
oggo

I think it is not that bad idea, but is huge effort :-)

Collapse
 
dealloc profile image
Wannes Gennar

if you're rolling your own authentication system for anything other than learning purposes (so god forbid production), you really should NOT be rolling an authentication system from scratch.
With that, I mean write one yourself.
Use libraries that are well established by people who know security.

Security is hard, and one mistake can open up all your users to being hacked, never mind the legal trouble YOU are going to be in when that happens (especially since OP wants to build a social network and those generally end up keeping sensitive information about their users).

Collapse
 
pablog6 profile image
Pablo Grant

Imo best practice is to use a third party system at first to validate ur idea then to switch over to ur own implementation after you've gotten enough traffic to validate your idea

Collapse
 
souksyp profile image
Souk Syp.

If you go solo, then use third party (auth0, firebase auth...). Else if you have time before launch, do it yourself for learning purpose.

Collapse
 
bsantosh909 profile image
Santosh Bhandari

Building a social network of your own means its better to have your own user authentication. That will give you more control with your stuffs.

Completely my opinion!