ryan-d-williams / MMM-GoogleSheets

Google Sheets Module for MagicMirror
MIT License
30 stars 2 forks source link

Why does this need to access ALL of my Sheets? #28

Closed brandonfake69 closed 3 months ago

brandonfake69 commented 1 year ago

Please change the scope to https://www.googleapis.com/auth/spreadsheets.currentonly so that it only accesses the current Sheet. Best practices in programming is to limit the scope of such requests. thanks

ryan-d-williams commented 1 year ago

@brandonfake69 great idea! These options were unfortunately not available when I built the application (there was no direct control over scope back then).

ryan-d-williams commented 3 months ago

@brandonfake69 Unfortunately I tried to make this change today, and it looks like it is no longer possible.

The link you sent is dead, and the new list of scopes no longer has an option for speadsheets.currentonly (https://developers.google.com/identity/protocols/oauth2/scopes#script). The only two available options are readonly and the scope the library currently uses. Unfortunately readonly cannot be used because this would not allow the library to be used with formulas while the sheet is closed (see #22).

I'm going to close this for now. Feel free to open it if you see a scope I missed. I'll keep an eye on the scopes in the future and update the library if they reinstate currentonly.