This repository was archived by the owner on Dec 16, 2025. It is now read-only.
v4.0.0
⚠ BREAKING CHANGES
- This commit creates multiple breaking changes. The
getToken()
method previously returnedPromise<string>, where the string was the
access_tokenreturned from the response. However, theoauth2endpoint could
return a variety of other fields, such as anid_tokenin special cases.
const token = await getToken();
// old response: 'some.access.token'
// new response: { access_token: 'some.access.token'}To further support this change, the GoogleToken class no longer exposes
a token variable. It now exposes rawToken, accessToken, and idToken
fields which can be used to access the relevant values returned in the
response.