Validate full email address on gam oauth create <EmailAddress> (#321)

* Validate full email address on gam oauth create <EmailAddress>

* Update documentation
This commit is contained in:
Ross Scroggs
2016-11-08 13:32:38 -08:00
committed by Jay Lee
parent 240edd6812
commit 5ec417d50c
2 changed files with 3 additions and 3 deletions

View File

@ -477,7 +477,8 @@ gam csv <FileName>|- [charset <Charset>] gam <GAM argument list>
# Example: gam csv Users.csv gam update user '~primaryEmail' address type work unstructured '~~Street~~, ~~City~~, ~~State~~ ~~ZIP~~'
# Each user (~primaryEmail, e.g. foo@bar.com) would have their work address updated
gam oauth|oauth2 create|request
gam oauth|oauth2 create|request [<EmailAddress>]
gam oauth|oauth2 delete|revoke
gam oauth|oauth2 info|verify [<AccessToken>]
@ -506,7 +507,6 @@ gam delete domainalias|aliasdomain <DomainAlias>
gam info domainalias|aliasdomain <DomainAlias>
gam print domainaliases|aliasdomains [todrive]
gam info customer
gam update customer [adminsecondaryemail|alternateemail <EmailAddress>] [language <LanguageCode] [phone|phonenumber <String>]
[contact|contactname <String>] [name|organizationname <String>]

View File

@ -10094,7 +10094,7 @@ See this site for instructions:
print u'ERROR: the format of your client secrets file:\n\n%s\n\n is incorrect. Please recreate the file.'
sys.exit(3)
if not login_hint:
if not login_hint or login_hint.find(u'@') == -1:
while True:
login_hint = raw_input(u'\nWhat is your G Suite admin email address? ')
if login_hint.find(u'@') == -1: