I can only recommend 
https://pkg.go.dev/golang.org/x/oauth2/clientcredentials?tab=doc if you are 
implementing that.

Configure clientcredentials.Config and use the http.Client returned by the 
Client method of that Config to do all your http calls.

It manages all the token refreshing automatically and transparently for you and 
is pretty battle hardened already. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/df2c6b50-1d45-4e6d-9c97-1d487a994c7e%40googlegroups.com.

Reply via email to