Home / Companies / FusionAuth / Blog / Post Details
Content Deep Dive

Adding Twitter sign in to your Node.js + Express web application using OAuth

Blog post from FusionAuth

Post Details
Company
Date Published
Author
Bradley Van Aardt
Word Count
2,763
Language
English
Hacker News Points
-
Summary

FusionAuth is used instead of plain Passport for authentication in Express applications because it provides a complete system that takes care of all aspects of authentication, including social login providers. FusionAuth can be easily integrated into the application without modifying code or redeploying the app. The application's logic and public information are handled by Node.js + Express, while sensitive information is handled by FusionAuth. This setup allows developers to focus on security efforts on the FusionAuth installation. Additionally, any integrations with other providers, such as Twitter sign-in, can be done once for all applications. To set up FusionAuth, Docker and Docker Compose are used to install and configure it. The application's social login functionality is enabled through a simple setup process. A Node.js + Express app is then built on top of this, with routes for logging in, registering, and accessing a "members only" area. The app uses Passport and the FusionAuth Typescript client to authenticate users via Twitter and retrieve their profile from FusionAuth.