Back to Browse

Simplified Oauth 2.0 Tutorial - Example with Node.js

44.4K views
Oct 1, 2020
11:50

Looking for the best Auth boilerplate? https://passkeyd.com In this tutorial we look at how to build a "Sign in with Github" OAuth solution. We will use node to build the backend with 3 routes and a frontend to go with it with HTML, CSS and Javascript. We will also look at how to create a new OAuth application in Github.com. The routes we need are "/", "/auth" and "/oauth-callback". We will send the user to github once they click the sign in button. We will pass the clientId of our oauth app so that Github knows from where the user came. If the user signs in to Github or just press "Accept if they were already logged in they will be redirected to our site on the route which we specified. In this case it is "oauth-callback". Github will give us a code that we can use to retrieve an authorization token from Github and then we can use that token to access some data from their Github profile. Hope you enjoy the tutorial! Code: https://github.com/danba340/oauth-github-example Say hi on twitter: https://twitter.com/barelydaniel

Download

1 formats

Video Formats

360pmp421.4 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Simplified Oauth 2.0 Tutorial - Example with Node.js | NatokHD