Skip to content

Commit afb3770

Browse files
committed
chore: bump refresh interval to 30 mins
1 parent 4c32089 commit afb3770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/_server_/storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class StorageClient {
3838

3939
if (accessTokenExpiry < Date.now()) {
4040
const { access_token } = await requestNewSpotifyToken();
41-
const newExpiry = Date.now() + 3600 * 1000; // spotify tokens expire in an hour
41+
const newExpiry = Date.now() + 1800 * 1000; // spotify tokens expire in an hour, pre-emptively refresh access token
4242

4343
console.log(`Token expired, new with expiry ${newExpiry.toString()}`);
4444
await this.client.set(StorageKey.ACCESS_TOKEN, access_token);

0 commit comments

Comments
 (0)