c# - Gmail API: forcing the authorization to reprompt the user -


the credentials authorizing access gmailapi seem cached somehow. when change client id , secret, , email address, nothing changes. also, when change scope, nothing changes. trying force credentials refresh. there way force credentials reprompt user?

is there file can find , delete?

i using c# , gmail api package nuget. code credentialing is:

 _emailaddress = settings.emailaddress; string clientsecret = settings.clientsecret; string clientid = settings.clientid; clientsecrets clientsecrets = new clientsecrets {clientid = clientid, clientsecret = clientsecret}; usercredential credential; credential = googlewebauthorizationbroker.authorizeasync(     clientsecrets,     scopes,     "user",     cancellationtoken.none).result;  _service = new gmailservice(new baseclientservice.initializer() {    httpclientinitializer = credential,    applicationname = "draft sender", //applicationname, }); 

also, once credential, scope set: cannot change scope until delete , renew secret , clientid. also, takes 2 run-throughs in order generate credentials, first resulting in error, second resulting in prompt authorize.

i'm pretty sure happening because credentials cached somewhere, somehow, though haven't specified storage...but don't know sure. either way, issue seems depend on code inside gmail api package, having trouble finding solution dealing with.

ultimately, need deploy functionality asp website access gmail account repository emails, need have authorization thing figured out server have access email account upon deployment (or after). not necessary (but desired) happen without intermediate error.

is there solution (easy or hard) control caching process , handle permissions?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -