Hi! Thank you so much for your time in advance.
I ran into this error when trying to integrate our Google Analytics to our self-hosted Metabase instance, and I have made sure the following is TRUE:
- The metabase
metabase/metabase:v0.42.2
is deployed via container to our on-prem Kubernetes cluster, it can be accessed through our edge router / reverse proxy Traefik, at http://xxxxx.yyyyy.com - I have enabled Google Analytics API on GCP, and made sure to create a Client ID for Desktop under the same Google Cloud Project.
- I got the Client ID and Client secret from this credentials, and use them in the Metabase page.
- I grabbed the Google Analytics Account ID from the Google Analytics page.
When I click the "Click here to get an auth code." it pops up a page with Authorization Error
on it, the details show:
If you’re the app developer, make sure that these request details comply with Google policies.
redirect_uri: urn:ietf:wg:oauth:2.0:oob
When I tried to "hack" the link behind the "Click here to get an auth code.", specifically, change the redirect_uri
from urn:ietf:wg:oauth:2.0:oob
to http://localhost
, the popped up page lets me do the OAuth and grant access to the OAuth client, and gives me an access code 4/0AXXXXXX
in the address bar, but it cannot be used in Metabase as it returns:
400 Bad Request POST https://oauth2.googleapis.com/token { "error" : "invalid_grant", "error_description" : "Bad Request" }
Am I missing anything here? Thanks!
{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.14.1+1",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.14.1",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.14.1+1",
"os.name": "Linux",
"os.version": "5.13.0-27-generic",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "14.1 (Debian 14.1-1.pgdg110+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.23"
}
},
"run-mode": "prod",
"version": {
"date": "2022-02-28",
"tag": "v0.42.2",
"branch": "release-x.42.x",
"hash": "d6ff494"
},
"settings": {
"report-timezone": null
}
}
}