I found this code that syncs Fitbit data to a Google spreadsheet. I would like to adapt it a bit, but i am stuck trying to figure out how the authorization is saved. I think my confusion is a result of a lack of understanding how OAuth works.
Here is the code: https://github.com/qslabs/FitbitDailyData/blob/master/FitbitDailyData.gs
It lets you configure the keys, and then when you authorize the first time in a spreadsheet, it pops up an authorization window. The next time it doesn't need the authorization window. I understand it won't ask for authorization if it's already authorized, but how does it remember which account authorized it? I don't see it saving any access tokens anywhere. Is it just automatic somehow when using Google script OAuth library?
Thank you