Compose providers into one: tried in order, the first that yields a credential wins (auth-and-credentials.md). The default client chain is explicit → environment → store → instance metadata (Node only).
// A custom source tried first, falling back to a vault lookup:const provider = chainProvider([ { resolve: async () => sessionFromMyCache() }, // null → try next { resolve: async () => tokenFromVault() },]);const client = createClient({ credentialProvider: provider }); Copy
// A custom source tried first, falling back to a vault lookup:const provider = chainProvider([ { resolve: async () => sessionFromMyCache() }, // null → try next { resolve: async () => tokenFromVault() },]);const client = createClient({ credentialProvider: provider });
Compose providers into one: tried in order, the first that yields a credential wins (auth-and-credentials.md). The default client chain is explicit → environment → store → instance metadata (Node only).