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.
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',
};