Skip to content
Snippets Groups Projects
Unverified Commit 40480d22 authored by Ryan Senior's avatar Ryan Senior Committed by GitHub
Browse files

Merge pull request #7406 from metabase/fix-google-app-name-hash

Allow for multiple hashes when constructing an app name for google
parents bf2138f8 8752bc2d
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
[config :as config]
[util :as u]]
[metabase.models.database :refer [Database]]
[ring.util.codec :as codec]
[toucan.db :as db])
(:import [com.google.api.client.googleapis.auth.oauth2 GoogleAuthorizationCodeFlow
GoogleAuthorizationCodeFlow$Builder GoogleCredential GoogleCredential$Builder GoogleTokenResponse]
......@@ -47,8 +48,9 @@
(def ^:const ^String application-name
"The application name we should use for Google drivers. Requested by Google themselves -- see #2627"
(let [{:keys [tag hash branch]} config/mb-version-info]
(format "Metabase/%s (GPN:Metabse; %s %s)" tag hash branch)))
(let [{:keys [tag ^String hash branch]} config/mb-version-info
encoded-hash (-> hash (.getBytes "UTF-8") codec/base64-encode)]
(format "Metabase/%s (GPN:Metabse; %s %s)" tag encoded-hash branch)))
(defn- fetch-access-and-refresh-tokens* [scopes, ^String client-id, ^String client-secret, ^String auth-code]
......
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