Soenneker.Google.Credentials 4.0.2567

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Google.Credentials --version 4.0.2567
                    
NuGet\Install-Package Soenneker.Google.Credentials -Version 4.0.2567
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Google.Credentials" Version="4.0.2567" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Google.Credentials" Version="4.0.2567" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Google.Credentials" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Google.Credentials --version 4.0.2567
                    
#r "nuget: Soenneker.Google.Credentials, 4.0.2567"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Google.Credentials@4.0.2567
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Google.Credentials&version=4.0.2567
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Google.Credentials&version=4.0.2567
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Google.Credentials

A utility for retrieving and caching Google credentials with dynamic scopes.

Install

dotnet add package Soenneker.Google.Credentials

Quick start

using Soenneker.Google.Credentials.Registrars;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
var result = services.AddGoogleCredentialsUtilAsSingleton();

Adds IGoogleCredentialsUtil as a singleton service.

What you get

  • IGoogleCredentialsUtil — A utility for retrieving and caching Google credentials with dynamic scopes.
  • GoogleCredentialsUtilRegistrar — An async thread-safe singleton for Google OAuth credentials.

API at a glance

API What it does Result / important behavior
IGoogleCredentialsUtil.Get(fileName, scopes, cancellationToken) Gets a scoped Google credential from a specified service account file. The scoped ICredential.
IGoogleCredentialsUtil.Remove(fileName, scopes, cancellationToken) Removes a cached credential for a specific file and scope set. true if removes a cached credential for a specific file and scope set; otherwise, false.
IGoogleCredentialsUtil.RemoveSync(fileName, scopes, cancellationToken) Removes a cached credential for a specific file and scope set (synchronous). Returns no value; the requested change is complete when the method returns.
GoogleCredentialsUtilRegistrar.AddGoogleCredentialsUtilAsSingleton(services) Adds IGoogleCredentialsUtil as a singleton service. The same service collection, so additional registrations can be chained.
GoogleCredentialsUtilRegistrar.AddGoogleCredentialsUtilAsScoped(services) Adds IGoogleCredentialsUtil as a scoped service. The same service collection, so additional registrations can be chained.

Practical notes

  • Cancellation stops pending work; it does not undo work that has already completed.
  • Calls that return a cached or singleton value reuse the same instance until the owning service is disposed.
  • Dispose instances you own when their scope ends so held resources can be released.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Google.Credentials:

Package Downloads
Soenneker.Google.IndexingService

A lazy, thread-safe provider for Google Indexing API clients keyed by service-account file.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.2570 103 8/30/2026
4.0.2569 88 8/30/2026
4.0.2568 65 8/30/2026
4.0.2567 77 8/29/2026
4.0.2565 62 8/29/2026
4.0.2564 55 8/29/2026
4.0.2563 58 8/29/2026
4.0.2562 143 8/26/2026
4.0.2561 79 8/26/2026
4.0.2560 83 8/26/2026
4.0.2559 139 8/22/2026
4.0.2558 115 8/21/2026
4.0.2557 120 8/21/2026
4.0.2556 133 8/20/2026
4.0.2555 141 8/19/2026
4.0.2554 118 8/18/2026
4.0.2553 116 8/18/2026
4.0.2552 143 8/13/2026
4.0.2551 122 8/13/2026
4.0.2550 121 8/12/2026
Loading failed

Update dependency Soenneker.Utils.File to 4.0.2230 (#3093)