hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
172 stars 65 forks source link

Remove unnecessary authentication #2

Closed JeroennC closed 6 years ago

JeroennC commented 6 years ago

This authentication seems to be leftover from old code, but is no longer necessary, as baseUrl's are already retrieved.

eouia commented 6 years ago

Thanks for your contribution. The only thing I aware is, temporal baseUrl could be expired before next scanning. By the API documents, baseUrl might have 1-hour lifetime after once generated. So, if an interval of scanning exceeds 1 hour (when user have tons of photos or longtime slideshow), I think there could be the risk of expiration of baseUrl. Do you consider this? Please tell me if I wrong.

JeroennC commented 6 years ago

Yes I noticed this remark in the code for the scanInterval, however this does not affect the actual refreshInterval right?

So the if-statement ensuring that scanInterval is no larger than 1 hour ensures that baseUrl is valid. Anyhow, the getPhoto function does not do a call to the google API anymore hence the re-authentication is not needed before it.

eouia commented 6 years ago

Thanks for inform. I'll merge this.

eouia commented 4 years ago

I can't maintain this module any more. Have you interest to take new ownership of this module? https://forum.magicmirror.builders/topic/12779/wanted-new-ownership-of-modules?page=1