Modify Authorized redirect_uris For Google OAuth

Jun 3, 2022

To log in with Google OAuth in Node.js, you should use the googleapis npm package. The OAuth redirect URI is the 3rd param to google.auth.OAuth2 as shown below.

const { google } = require('googleapis');

const oauth2Client = new google.auth.OAuth2(

Google requires you to configure a list of allowed OAuth callback URLs (also called OAuth redirect URIs) in the Google Cloud Platform console. To modify your app's allowed redirect URIs, go to, click the left side panel, and navigate to APIs & Services > Credentials.

From there, find the OAuth credential that you want to modify. Click "Edit" and you should see a list of "Authorized redirect URIs".

More Node Tutorials