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 .
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.
Source code:
PUBLICATION PERMISSIONS:
Daniel provide
1 view
10
7
10 months ago 00:28:28 1
Application Security: Inside Out • Simon Corlett • GOTO 2023
11 months ago 00:31:44 1
Mastering Web Security: Myths, Strategies & More! • Scott Helme & Sebastian Brandes • GOTO 2023
11 months ago 00:42:48 1
How The Hack? • Ben Sadeghipour @NahamSec • GOTO 2023
12 months ago 00:04:13 1
Privacy, Crime, National Security, Human Rights & You in 4 Minutes • Bert Hubert • GOTO 2023
1 year ago 00:44:54 1
The State of Application Security 2023 • Sebastian Brandes • GOTO 2023
1 year ago 00:02:25 1
Beyond Passwords: How WebAuthn Actually Works in 2 Minutes • Eli Holderness • GOTO 2023
1 year ago 00:27:43 1
Unlocking the Web: Exploring WebAuthn & Beyond • Eli Holderness & Mark Rendle
1 year ago 00:26:58 1
Unlocking the Web: Exploring WebAuthn & Beyond • Eli Holderness & Mark Rendle • GOTO 2023
1 year ago 00:39:43 1
Principles For Secure & Reliable Systems • Eleanor Saitta • GOTO 2023
1 year ago 00:33:29 1
Building Images For The Secure Supply Chain • Adrian Mouat • GOTO 2023
1 year ago 00:33:05 1
Using IAST to Unlock the Benefits of DevSecOps • Jeff Williams • YOW! 2022
1 year ago 00:41:44 1
Beyond Passwords: How WebAuthn Actually Works • Eli Holderness • GOTO 2023
1 year ago 00:50:14 1
Have I Been Pwned? • Troy Hunt • GOTO 2023
2 years ago 00:38:44 1
Competence Development Through Capture the Flag & Virtual Hacker Labs • Jens M. Pedersen • GOTO 2023
2 years ago 00:42:01 1
Privacy, Crime, National Security, Human Rights & You in the Middle • Bert Hubert • GOTO 2023
2 years ago 00:40:11 1
Has My IoT Device Been Hacked? Establishing Trust w/ Remote Attestation • Edlira Dushku • GOTO 2023
2 years ago 00:48:59 1
Protect Your Code with GitHub Security Features • Rob Bos • GOTO 2023
2 years ago 00:33:12 1
Hack Like a Pro: Bug Bounties, Web Vulnerabilities & More! • Ben @NahamSec & Julian Wood • GOTO 2022
2 years ago 00:47:35 1
Lessons From Billions of Breached Records • Troy Hunt • GOTO 2022
2 years ago 00:40:50 1
What the Hack: A Personal Story about Ethical Hacking • Ben Sadeghipour • GOTO 2022
2 years ago 00:24:58 1
Investigating Privacy Issues on Mobile Platforms • Felix Krause • GOTO 2022
2 years ago 00:54:08 1
Rise of the Breaches • Troy Hunt • YOW! 2019
2 years ago 00:13:26 1
The Current State of Cyber Security • Eleanor Saitta & Aino Vonge Corry • GOTO 2022