From 12afd9e383228fba99925fd510bf8964fba20dcd Mon Sep 17 00:00:00 2001 From: soh335 Date: Sun, 20 Oct 2024 10:27:58 +0900 Subject: [PATCH] x/oauth2: clarify that ExpiresIn is not automatically populated by the package Related golang/go#61417 merges golang/oauth2#747 (https://github.com/golang/oauth2/pull/747) --- token.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/token.go b/token.go index ad191b4f3..75382d72f 100644 --- a/token.go +++ b/token.go @@ -54,6 +54,8 @@ type Token struct { // relative to an unknown time base approximately around "now". // It is the application's responsibility to populate // `Expiry` from `ExpiresIn` when required. + // The oauth2 package does not automatically populate + // `ExpiresIn` even if the server returns an "expires_in" field. ExpiresIn int64 `json:"expires_in,omitempty"` // raw optionally contains extra metadata from the server