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

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…

Contents