I'm following the Google Drive Api documentation that is at: https://developers.google.com/drive/v3/web/quickstart/dotnet
I've changed the folder to another specific folder.
My Code
string credPath = Server.MapPath(@"~\googleDrive");
credPath = Path.Combine(credPath, ".credentials/drive-dotnet-quickstart.json");
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
Scopes,
"user",
CancellationToken.None,
new FileDataStore(credPath, true)).Result;
By the implemented form, the same permission will always be used (the first one), since it must be linked to the 'user' field.
My questions:
- How do I search for the current account logged into Google to put it in the
user
field? - How do I if the user is not logged in, he can not access anything?
- Should I change the
user
field or the license path or both, for userx
not accessing user datay
? - If on the permission screen as the image below, if the user close the browser or deny access, what is the best practice for the page not to be locked?