Creating a Google Client
00:00 That’s enough preface. Let’s get into some implementation. Open up a browser and go to console.developers.google.com. Create or select a project. On the left, click the Credentials link.
00:16 Click on the CONFIGURE CONSENT SCREEN button to provide details that will be displayed on the consent screen. For the User Type select External, as this app will be available to any Google account, not just those in a specific organization.
00:31 There are many fields to provide data for the consent screen, but for now, just fill out the Application name and click Save.
00:42 Click the Credentials link on the left again. With the consent screen configured, you can move on to registering your app. Click the CREATE CREDENTIALS button at the top. Next, select OAuth client ID.
00:55 Select Web application for the Application type. You can name these credentials, but the important fields are under restrictions. The authorized JavaScript origin must be the same as the domain of your app. For the demo app, you’ll stay on the local machine.
01:12
Flask runs by default on port 5000
, so use https://127.0.0.1:5000
. For the authorized redirect URI, provide https://127.0.0.1:5000/login/callback
.
01:33 This is the endpoint that Google will redirect the user to after they give Google permission to allow your app to access their data. Click the CREATE button and copy the client ID and secret for later use.
01:46 In the next lesson, you’ll set up the development environment.
Become a Member to join the conversation.