docker-ifyed.
This commit is contained in:
@@ -41,14 +41,14 @@
|
||||
(defroutes unauthenticated-routes
|
||||
(GET "/" []
|
||||
(response/resource-response "index.html" {:root "public"}))
|
||||
(GET "/api/oauth" {{:strs [code]} :query-params}
|
||||
(GET "/api/oauth" {{:strs [code]} :query-params :keys [scheme] :as r {:strs [host]} :headers}
|
||||
(try
|
||||
(let [auth (-> "https://accounts.google.com/o/oauth2/token"
|
||||
(http/post
|
||||
{:form-params {"client_id" google-client-id
|
||||
"client_secret" google-client-secret
|
||||
"code" code
|
||||
"redirect_uri" "http://localhost:3449/api/oauth"
|
||||
"redirect_uri" (str (name scheme) "://" host "/api/oauth")
|
||||
"grant_type" "authorization_code"}
|
||||
:as :json})
|
||||
:body)
|
||||
|
||||
Reference in New Issue
Block a user