claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.33k stars 89 forks source link

Refresh token before it expires #355

Closed abelfodil closed 1 year ago

abelfodil commented 1 year ago

In version 5, users receive daily notifications to authorize the device. Is it possible to implement a background token refresh mechanism to enhance the user experience, eliminating the need for frequent user notifications?

claabs commented 1 year ago

The application is scheduled at an OS level to save on memory, so there's not currently the ability for a dedicated background token refresh job. I recommend you just set the cronSchedule variable to run every 6 hours. See: https://claabs.github.io/epicgames-freegames-node/classes/AppConfig.html#cronSchedule

abelfodil commented 1 year ago

Clearing config to regenerate new defaults put schedule to every 6 hours. Waiting 24h to see if issue is resolved.