https://github.com/ndom91/hometime-access-refresh
Node script to work around refreshing Google OAuth token for hometime
https://github.com/ndom91/hometime-access-refresh
gcalcli hometime nodejs
Last synced: about 1 month ago
JSON representation
Node script to work around refreshing Google OAuth token for hometime
- Host: GitHub
- URL: https://github.com/ndom91/hometime-access-refresh
- Owner: ndom91
- License: mit
- Created: 2025-09-30T15:08:56.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T15:22:05.000Z (8 months ago)
- Last Synced: 2025-12-25T13:12:21.605Z (5 months ago)
- Topics: gcalcli, hometime, nodejs
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `hometime-access-refresh`
This is a little node script that refreshes the access token for the
[hometime](https://github.com/ndom91/calendar-led-strip) app. It is intended to be run as a cron job.
## ℹ Background Info
This little script is necessary because I haven't gotten the Google OAuth
offline app credentials to not expire after 7 days. So for my
`calendar-led-strip` project, we're using [`gcalcli`](https://github.com/insanum/gcalcli) which requires this
generated `oauth` file which is generated via their `gcalcli --init` command.
So long story short, this script executes that init command, inserts your
clientId and clientSecret and then opens the browser for you to login with your
Google account. After you login, it saves the generated `oauth` file and
optionally copies it to the little server running the `hometime` service and
restarting the appropriate systemd service.
## 📦 Setup
1. Clone the repository and make a copy of the env vars file
```sh
git clone https://github.com/ndom91/hometime-access-refresh && cd hometime-access-refresh
pnpm install
cp .env.example .env.local
```
2. Update the `.env.local` file with your credentials
3. Run `start` npm script or run it as a cron job
## 📝 License
MIT