From the course: React: Authentication

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Adding an OAuth callback route

Adding an OAuth callback route - React.js Tutorial

From the course: React: Authentication

Adding an OAuth callback route

- [Instructor] All right, so now that we've got this consent screen that's being displayed to the user, and by the way, if you're getting some sort of like authentication error or something like that instead of this screen here, make sure that you restart your Codespace once you've added those client secrets from GitHub because I ran into that problem as well, right? Basically it just didn't have the client ID and client secret that are needed for this URL. So anyway, that's just something I wanted to mention there. All right, so what we're going to need to do here is open our server back up and actually I have that right there. And what we're going to do here is we're going to add another route that will be that callback route that we added in the Google Cloud console. So here's what this is going to look like. We're going to say app.get, and this one here is going to be /auth/google/callback. Now we don't need that API thing here because the call for this isn't going to be coming…

Contents