Refresh api token
This commit is contained in:
@@ -24,8 +24,12 @@ namespace WebAPI
|
||||
}
|
||||
private GoogleCredential GetCredentialsFromFile()
|
||||
{
|
||||
string fileName = "client_secrets.json";
|
||||
#if DEBUG
|
||||
fileName = "client_secrets.Development.json";
|
||||
#endif
|
||||
GoogleCredential credential;
|
||||
using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
|
||||
using (var stream = new FileStream(fileName, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
credential = GoogleCredential.FromStream(stream).CreateScoped(Scopes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user