15 - Implementation of Social Authentication II - Advanced Node and Express - freeCodeCamp
Ganesh H
We'll use the 'passport-github' npm package to create a GithubStrategy which will allow the user to login through GitHub and make their profile details available in a callback function.
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/implementation-of-social-authentication-ii Written Guide: https://www.notion.so/ganeshh123/Implementation-of-Social-Authentication-II-605f600ee7b9426fa9657311f55ce9af
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1RL9djhgSH65pZhJ6xSyKX8 All Writen Guides for this course : https://www.notion.so/ganeshh123/ccf6039186334f83a54c1c9216f30e3c All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction 00:12 - passport-github Setup 01:44 - Using the Strategy - passport.use() Configure a strategy. Strategies have a "default name" assigned to them, so you don't have to give them a name. new GitHubStategy() The GitHub authentication strategy authenticates users using a GitHub account and OAuth 2.0 tokens. The client ID and secret obtained when creating an application are supplied as options when creating the strategy. The strategy also requires a verify callback, which receives the access token and optional refresh token, as well as profile which contains the authenticated user's GitHub profile. The verify callback must call cb providing a user to complete authentication. https://github.com/jaredhanson/passport-github#configure-strategy 03:30 - Where the Profile Information becomes available 04:32 - Testing the Strategy 06:14 - Explanation of Solution
-————————————————————————————————————- Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.
Express.js, or simply Express, is a web application framework for Node.js. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js. Express runs between the server created by Node.js and the frontend pages of a web application. Express also handles an application's routing.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTM ... https://www.youtube.com/watch?v=OEdjgMuB3QA
37095103 Bytes