This repository was archived by the owner on Nov 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,26 @@ export abstract class AuthClient
207207 this . forceRefreshOnFailure = opts . forceRefreshOnFailure ?? false ;
208208 }
209209
210+ /**
211+ * Return the {@link Gaxios `Gaxios`} instance from the {@link AuthClient.transporter}.
212+ *
213+ * @expiremental
214+ */
215+ get gaxios ( ) : Gaxios | null {
216+ if ( this . transporter instanceof Gaxios ) {
217+ return this . transporter ;
218+ } else if ( this . transporter instanceof DefaultTransporter ) {
219+ return this . transporter . instance ;
220+ } else if (
221+ 'instance' in this . transporter &&
222+ this . transporter . instance instanceof Gaxios
223+ ) {
224+ return this . transporter . instance ;
225+ }
226+
227+ return null ;
228+ }
229+
210230 /**
211231 * Provides an alternative Gaxios request implementation with auth credentials
212232 */
Original file line number Diff line number Diff line change 1313// limitations under the License.
1414import { GoogleAuth } from './auth/googleauth' ;
1515
16+ // Export common deps to ensure types/instances are the exact match. Useful
17+ // for consistently configuring the library across versions.
1618export * as gcpMetadata from 'gcp-metadata' ;
19+ export * as gaxios from 'gaxios' ;
1720
1821export { AuthClient , DEFAULT_UNIVERSE } from './auth/authclient' ;
1922export { Compute , ComputeOptions } from './auth/computeclient' ;
You can’t perform that action at this time.
0 commit comments