What's the easiest way to put authentication into a website
Roger Stach

Roger Stach @roger

About: Web Developer located in Jakarta.

Location:
Jakarta, Indonesia
Joined:
Aug 12, 2017

What's the easiest way to put authentication into a website

Publish Date: Dec 2 '17
12 10

I usually just use PHP & MySQL, but I would like to know the modern way to create it. Probably with MongoDB or some fancy JavaScript framework.

Comments 10 total

  • Dian Fay
    Dian FayDec 2, 2017

    Passport is solid and decently easy to set up if you're using Express (there are independent modules for other frameworks like koa) and don't have anything especially outré in your user model.

    Or if you want to use OAuth, there's Grant. But I haven't used that one.

  • Ali Spittel
    Ali SpittelDec 2, 2017

    Meteor (JavaScript framework that uses Mongo) has auth built in which makes life super easy! I have found auth in Express kind of tricky but that could just be for my specific purposes. I also love Django (Python) which also has auth out of the box!

    • Hamza
      HamzaDec 2, 2017

      I think using Meteor to do authentication is overkill, express and passport are great, especially for learning how things work, but I think the most effective way is not reinventing the wheel, Auth0 does the job perfectly.

      • Ben Halpern
        Ben HalpernDec 2, 2017

        That might be true but it's worth knowing about it that makes picking Meteor as a general solution more appealing.

        • Hamza
          HamzaDec 2, 2017

          I totally agree with you on that.

  • Ben Halpern
    Ben HalpernDec 2, 2017

    Auth0 comes to mind—Auth as a service. I haven't used it, but it definitely has the potential to take a lot off your plate and will likely integrate well with the fancy JS framework of your dreams.

    • Roger Stach
      Roger StachDec 3, 2017

      What does dev.to use for it's authentication?

      • Bence Hornyak
        Bence HornyakDec 4, 2017

        Twitter and/or Github oauth2 based on how you can create your dev.to account.. :)

    • Sylvain Marty
      Sylvain MartyDec 4, 2017

      I implemented it a few months ago and it was kind of easy to setup and a very powerful service.
      But I think that it's a good thing to know how to setup at least basic HTTP and JWT Authentication itself before using a Saas for authentication. For example, JWT Auth implementation isn't simple and a bad implementation can lead to security issues on both server and client side. So, implementing the solution by himself is a good way to learn how it works and to learn the best pratices. ;)

  • Darren Harding
    Darren HardingDec 4, 2017

    As a .NET developer and for my personal projects I feel you can't go wrong with good old ASP.NET Identity. I'm not sure how well it scales to larger projects however.

Add comment