mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 14:43:34 +00:00
remove .apps.googleusercontent.com from client id for auth
This commit is contained in:
@ -9416,6 +9416,9 @@ gam create project
|
|||||||
try:
|
try:
|
||||||
cs_json = json.loads(cs_data)
|
cs_json = json.loads(cs_data)
|
||||||
client_id = cs_json[u'installed'][u'client_id']
|
client_id = cs_json[u'installed'][u'client_id']
|
||||||
|
# chop off .apps.googleusercontent.com suffix as it's not needed
|
||||||
|
# and we need to keep things short for the Auth URL.
|
||||||
|
client_id = re.sub(u'\.apps\.googleusercontent\.com$', u'', client_id)
|
||||||
client_secret = cs_json[u'installed'][u'client_secret']
|
client_secret = cs_json[u'installed'][u'client_secret']
|
||||||
except (ValueError, IndexError, KeyError):
|
except (ValueError, IndexError, KeyError):
|
||||||
print u'ERROR: the format of your client secrets file:\n\n%s\n\n is incorrect. Please recreate the file.'
|
print u'ERROR: the format of your client secrets file:\n\n%s\n\n is incorrect. Please recreate the file.'
|
||||||
|
Reference in New Issue
Block a user