fix: always attempt external auth refresh when fetching (#11762) (#11830)

* fix: always attempt external auth refresh when fetching
* refactor validate to check expiry when considering "valid"
This commit is contained in:
Steven Masley
2024-01-29 08:55:15 -06:00
committed by GitHub
parent eeef56a655
commit d66e6e78ee
6 changed files with 148 additions and 99 deletions

View File

@ -57,7 +57,7 @@ func (api *API) externalAuthByID(w http.ResponseWriter, r *http.Request) {
}
var eg errgroup.Group
eg.Go(func() (err error) {
res.Authenticated, res.User, err = config.ValidateToken(ctx, link.OAuthAccessToken)
res.Authenticated, res.User, err = config.ValidateToken(ctx, link.OAuthToken())
return err
})
eg.Go(func() (err error) {