Skip to content
Snippets Groups Projects
Commit e5d90a0b authored by Sameer Al-Sakran's avatar Sameer Al-Sakran Committed by GitHub
Browse files

Merge pull request #4949 from metabase/issue-4179

Add link with Google Drive scope to BQ db details
parents e6be2789 ff7c2d1c
No related merge requests found
......@@ -15,6 +15,7 @@ function isEmpty(str) {
const AUTH_URL_PREFIXES = {
bigquery: 'https://accounts.google.com/o/oauth2/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/bigquery&client_id=',
bigquery_with_drive: 'https://accounts.google.com/o/oauth2/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/bigquery%20https://www.googleapis.com/auth/drive&client_id=',
googleanalytics: 'https://accounts.google.com/o/oauth2/auth?access_type=offline&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/analytics.readonly&client_id=',
};
......@@ -222,7 +223,10 @@ export default class DatabaseDetailsForm extends Component {
authURLLink = (
<div className="flex align-center Form-offset">
<div className="Grid-cell--top">
<a href={authURL} target='_blank'>Click here to get an auth code 😋</a>
<a href={authURL} target='_blank'>Click here</a> to get an auth code
{ engine === "bigquery" &&
<span> (or <a href={AUTH_URL_PREFIXES["bigquery_with_drive"] + clientID} target='_blank'>with Google Drive permissions</a>)</span>
}
</div>
</div>);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment