Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

4.4K
Views
Error 400: invalid_request when using Google Oauth 2.0 in local

Authorization Error Error 400: invalid_request

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.

You can let the app developer know that this app doesn't comply with one or more Google validation rules.

enter image description here

What I've tried so far:

  • Add a custom domain in the host file so I can go to the website using something like mywebsite.com:4200. Same error
  • Make localhost HTTPS using self-signed certificates, google says the domain is not a valid origin even though I already added https://localhost:4200 in the console.

The OAuth works fine when in the test and production environment, the problem is I cannot test the application in my local machine. This only happened this month, last month this was intermittent and a refresh would fix the issue.

If it helps, I am using ng-gapi. Here's my config:

import { NgGapiClientConfig } from 'ng-gapi/config/GoogleApiConfig';
import { environment } from '@env/environment';

export const gapiClientConfig: NgGapiClientConfig = {
  client_id: environment.clientId,
  discoveryDocs: [],
  scope: 'https://www.googleapis.com/auth/userinfo.email',
};
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

To solve this, create a new google project and set the publishing status to testing.

enter image description here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!