GitHub Login With React (GitHub APIs, GitHub OAuth 2.0 Authentication)

  Рет қаралды 24,754

Cooper Codes

Cooper Codes

Күн бұрын

🎓 Join my learning platform for module based courses, learning exercises, and more: coderprep.com/
In this video we go over how to create a full GitHub OAuth 2.0 authentication system, fit with a React frontend, custom proxy server, and the ability to interact with the GitHub API by grabbing user data. This video is a great start for anyone who is interested in adding GitHub integrations to their React project, or wants to make GitHub one of their main ways of authentication. GitHub has a super powerful API, so this video should help you get started when it comes to interacting with the initial authentication.
Buying stuff through my Amazon link supports the channel! amzn.to/3hK5gd0
Business inquiry? Email thecoopercodes@gmail.com
0:00 Intro / project showcase
0:57 System diagram
2:50 Initialize GitHub OAuth 2.0 Application
4:21 Create React app / remove strict mode
6:00 Creating initial login logic
9:00 Process code parameter from URL
11:00 Create proxy server / call GitHub APIs
22:30 Create access token logic for frontend
27:11 Get user data with access token
33:51 Final project / thanks for watching!

Пікірлер: 24
@matthewblasco4720
@matthewblasco4720 9 ай бұрын
OMG! The way everything was explained was legit awesome! it was all digestible, I only have 1 or two rewind and everything was smooth thank you so much
@aldusdanielmonteiro3636
@aldusdanielmonteiro3636 Жыл бұрын
This video is amazing! I don't know how it has that little of views really useful. The only thing I didn't get it is that if we need to save specific data of our app and link that to an user how we associate GitHub profile with a user in our platform (let's say a game and I want to have player stats) (sorry for any English mistakes and feel free to correct them)
@user-dc4qs5vs5z
@user-dc4qs5vs5z Жыл бұрын
Really a great video. It helped me a lot. Would like to mention that if we try to fetch the access token directly from the client, the response would be opaque, which means client won't be able to access the body or access token. You will see accessToken in network tab but won't be able to access it in code. So I think server would be necessary here.
@yazidmohammedbouguedra4523
@yazidmohammedbouguedra4523 Жыл бұрын
One thing to mention here is that the whole point of a proxy is to not store the Github token on the client side, ideally they'd be stored in the server. Client requests the server using a user ID -> server requests GH API using the token of that user -> returns the response If we're storing the GH token on the client side, we might as well call the GH API directly...
@user-fd6wx6ns2v
@user-fd6wx6ns2v Жыл бұрын
OMG!!!! You saved me... Thanks for this amazing video!!!
@artemshumeiko
@artemshumeiko Жыл бұрын
Great video, keep it up!
@atolz1352
@atolz1352 Жыл бұрын
Finally a video making sense!! THnak you
@medilies
@medilies 11 ай бұрын
Im a Laravel dev. But this is still useful to me
@GDMeira
@GDMeira 9 ай бұрын
Really good content
@osmansagsoz9701
@osmansagsoz9701 Жыл бұрын
Thank you so much! Again an amazing video. I wanna make an app for searching repositories with the search api, is it like this too or do i need to change something? The docs on github are a mess i don't understand anything
@zero3281
@zero3281 12 күн бұрын
EPIC.
@rij3142
@rij3142 8 ай бұрын
Getting a 'bad credentials' message when trying to store userData or try to acess userData, any suggestions?
@TodorImreorov
@TodorImreorov 4 ай бұрын
I am assuming this can be done without an express server and hosted as a gh-page?
@epicgame6426
@epicgame6426 8 ай бұрын
i write the same code but it is not work. it is failed to fetch
@0xfd-xz6ob
@0xfd-xz6ob 3 ай бұрын
Thank you for the video. I have an error message that says "Cookie must be enabled to use Github" But my browser is not blocking any third-party cookie. Any idea on how to fix this?
@riiya7928
@riiya7928 3 ай бұрын
How to do this but on youtube?
@zahidhussain629
@zahidhussain629 10 ай бұрын
I need the same thing with next-auth in next 13. anyone has implemented this?
@user-lb7ni9yq2r
@user-lb7ni9yq2r 10 ай бұрын
Please can we get the source code for this course
@namanjain9506
@namanjain9506 Жыл бұрын
Code repo?
@nyctophialicnid782
@nyctophialicnid782 Жыл бұрын
Can you please push the code to Github. :)
@TrueDetectivePikachu
@TrueDetectivePikachu 9 ай бұрын
holup, why removing react strict could be so controversial? Second, why in the world would react render twice? Why the redundancy?
@anasouardini
@anasouardini Жыл бұрын
I though it would be hard like google's. google's way of doing oauth is stupid compared to github.
@thimerlanmatyakubov8940
@thimerlanmatyakubov8940 Жыл бұрын
(in promise) SyntaxError: Unexpected token '
@enio.carlos
@enio.carlos Жыл бұрын
check the urls
Атака ВСУ на Курскую область: что происходит?
24:16
BBC News - Русская служба
Рет қаралды 1,7 МЛН
Stop, Intel’s Already Dead! - AMD Ryzen 9600X & 9700X Review
13:47
Linus Tech Tips
Рет қаралды 1,2 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 9 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 12 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 40 МЛН
NestJS & Google OAuth2 with Passport
1:12:18
Anson the Developer
Рет қаралды 36 М.
Google OAuth 2.0 With NodeJS (No Passport or googleapis)
57:18
TomDoesTech
Рет қаралды 93 М.
I Never Want To Build Authentication Any Other Way
2:03:20
Elliott Chong
Рет қаралды 17 М.
Build a Fullstack Blog App using MERN (mongo, express, react, node)
3:32:10
Coding With Dawid
Рет қаралды 357 М.
Full Tutorials Python and ReactJS: 2 hours. From zero to hero
1:53:33
MasterCode Academy
Рет қаралды 5 М.
MAGNUS vs HANS!!!! MAGNUS vs HANS!!!!!!!!!!
28:17
GothamChess
Рет қаралды 55 М.
FastAPI + Github OAuth
14:19
Will Estes
Рет қаралды 7 М.
Google Identity Services Login with React (2023 React Google Login)
19:50
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 2,4 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,6 МЛН
Лучший браузер!
0:27
Honey Montana
Рет қаралды 1,1 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 557 М.
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 7 МЛН