diff --git a/ChangeLog b/ChangeLog index 9841de6a..484af02c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -167,6 +167,7 @@ Added dropbox_id option. * GitHub and DropBox secret's moved out from config.json to env. +* Fixed bug with auth in github. 2012.10.01, Version 0.1.7 diff --git a/README.md b/README.md index 1a6dcbe2..33d384ab 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,8 @@ All main configuration could be done thrue config.json. "html" : true, "img" : false }, - "github_key" : "ec1f2e74b35a361e10bc", + "github_key" : "891c251b925e4e967fa9", + "github_secret" : "afe9bed1e810c5dc44c4c2a953fc6efb1e5b0545", "dropbox_key" : "0nd3ssnp5fp7tqs", "dropbox_chooser_key" : "o7d6llji052vijk" "show_keys_panel" : true, /* show classic panel with buttons of keys */ diff --git a/config.json b/config.json index 2af0160c..2cee4339 100644 --- a/config.json +++ b/config.json @@ -6,9 +6,10 @@ "js" : false, "css" : false, "html" : false, - "img" : false + "img" : true }, - "github_key" : "ec1f2e74b35a361e10bc", + "github_key" : "891c251b925e4e967fa9", + "github_secret" : "afe9bed1e810c5dc44c4c2a953fc6efb1e5b0545", "dropbox_key" : "0nd3ssnp5fp7tqs", "dropbox_chooser_key" : "o7d6llji052vijk", "logs" : false, diff --git a/lib/server/auth.js b/lib/server/auth.js index f32cb04b..04f56c83 100644 --- a/lib/server/auth.js +++ b/lib/server/auth.js @@ -48,12 +48,16 @@ }; function authenticate(pCode, pCallBack) { - var lId = Config.github_id, + var lId = Config.github_key, + lSecret = Config.github_secret, lEnv = process.env, - lClientId = lEnv.github_id || lId, - lClientSecret = lEnv.github_secret; - + lClientId = lEnv.github_key || lId, + lClientSecret = lEnv.github_secret || lSecret; + + console.log(lClientId); + console.log(lClientSecret); + var data = qs.stringify({ client_id : lClientId, client_secret : lClientSecret, diff --git a/shell/secret.bat b/shell/secret.bat index cd8a30d3..b6087e80 100644 --- a/shell/secret.bat +++ b/shell/secret.bat @@ -8,4 +8,5 @@ # for using just add %-symbol on start and end of name # like %github_secret% -github_secret=e21b3724d84f0f7570d2d04d8e055f3cc3be3071 +set github_key=435c670f44320e287ad6 +set github_secret=a8b49e8c8c1a6253b149d224149a076270d8d614 diff --git a/shell/secret.sh b/shell/secret.sh index 2d41ff9a..6b4ecfba 100755 --- a/shell/secret.sh +++ b/shell/secret.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # part of Cloud Commander # *nix version @@ -8,4 +9,4 @@ # for using just add $-symbol on start of name # like $github_secret -export github_secret=e21b3724d84f0f7570d2d04d8e055f3cc3be3071 +export github_secret=afe9bed1e810c5dc44c4c2a953fc6efb1e5b0545