Track access token and refresh token expiry

Also make a bunch more progress on actually updating the tokens when we
need them updated.
This commit is contained in:
Eli Ribble 2025-11-07 05:46:41 +00:00
parent cf01c8c5c6
commit 109495b702
No known key found for this signature in database
11 changed files with 348 additions and 104 deletions

View file

@ -82,14 +82,14 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
newTokenChannel := make(chan int, 10)
NewOAuthTokenChannel = make(chan struct{}, 10)
var waitGroup sync.WaitGroup
waitGroup.Add(1)
go func() {
defer waitGroup.Done()
refreshFieldseekerData(ctx, newTokenChannel)
refreshFieldseekerData(ctx, NewOAuthTokenChannel)
}()
server := &http.Server{