kmarrip / kmarrip/goSpotify

Refresh access token if its about to expire

Open
#15 8 comments 0 reactions 1 assignee Claimed by @kmarrip View on GitHub
enhancement hacktoberfest
Dominant language
Go
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Description

For every request access token ,refresh token are sent as cookies to the server
- send an expiry time cookie which has unix time stamp of the expiry date, generate this when access token is generated
- for every future request in the base handler, check the current time stamp and the expiry time stamp
- if it is about to expire in about lets say 5 min, send the request to refresh endpoint
- get the refresh token from the cookie and talk to spotify via their api and save the access, refresh token and expiry unix time stamp
- finally send the request to base url

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.