Closed nicolasboattini closed 9 months ago
Iirc, there is no need to send auth request if you have refresh token; instead send refresh request to update the auth token. And &approval_prompt=force
is required to get the refresh token on the initial auth request. Check the sample project: it doesn't ask for auth after it was completed initially.
This issue is stale because it has been open 14 days with no activity. It will be automatically closed in 7 days.
I finally figured it out. While reviewing your latest commits on the fork I created, I came across the with following code in the file "LoopbackAccessTokenProvider.cs" at "Assets/UnityGoogleDrive/Runtime/Authorization/":
I attempted to change the parameter 'approval_prompt' to 'auto', and that resolved everything – no more prompting for permissions once accepted previously. So, I set up a response loopback HTML with a script to close the window upon redirection, and it worked like a charm!
I also configured Edge as the default browser (since Chrome wouldn't let me close the window via script) and logged into the only account that will be uploading the files.
Perhaps it would be useful to add a selection field in the configurations to choose the values for 'approval_prompt' and 'access_type'.