From the course: React: Authentication (2021)
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Loading user info from Google - React.js Tutorial
From the course: React: Authentication (2021)
Loading user info from Google
- [Narrator] Okay the next step for us now is to define the callback route on our server that Google will send our users back to once they've given permission to our app to access some of their data. And this is where we'll actually be able to parse the data that they've given us access to and do stuff like create a new account in our database and so on. So here's what that's going to look like. Let's head back to our source code here, and we're going to go to our backend code. And just like we did, when we created the Google OAuth URL, we're going to generate a route and a couple helper functions just to make sure everything goes smoothly and is well-organized. So first, let's start by creating our route. We're going to call this route "googleOauthCallbackRoute." All right? And we'll come back and implement that a little later. And then inside our Utl folder, we're going to create two new files. One is going to be…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
OAuth basics3m 17s
-
(Locked)
Setting up OAuth on Google6m 33s
-
(Locked)
Adding an OAuth URL route7m 49s
-
(Locked)
Creating a "Sign in with Google" button4m 49s
-
(Locked)
Loading user info from Google5m 32s
-
(Locked)
Creating new users from OAuth data4m 32s
-
(Locked)
Adding an OAuth callback route4m 26s
-
(Locked)
Handling successful OAuth authentication3m 40s
-
(Locked)
-
-
-