I don't really like how complex the Google authentication is. This function checks for credentials but the GoogleCalendar implementation also performs some authentication (creating as token). It's become hard to follow how authentication is done so if a token.json file is what all these google APIs use then I think 1 single place should create it and the rest of the code doesn't have to always check if it exists and create if not...not worth doing in this PR but wanted to mention my thoughts about this.
I don't really like how complex the Google authentication is. This function checks for credentials but the GoogleCalendar implementation also performs some authentication (creating as token). It's become hard to follow how authentication is done so if a token.json file is what all these google APIs use then I think 1 single place should create it and the rest of the code doesn't have to always check if it exists and create if not...not worth doing in this PR but wanted to mention my thoughts about this.
_Originally posted by @20k-ultra in https://github.com/balena-io-playground/meetbot/pull/56#discussion_r806165006_