Soenneker.Google.Credentials
4.0.2568
Prefix Reserved
dotnet add package Soenneker.Google.Credentials --version 4.0.2568
NuGet\Install-Package Soenneker.Google.Credentials -Version 4.0.2568
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.2568" />
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.2568" />
<PackageReference Include="Soenneker.Google.Credentials" />
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.2568
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Google.Credentials, 4.0.2568"
#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.2568
#: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.2568
#tool nuget:?package=Soenneker.Google.Credentials&version=4.0.2568
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
net10.0
- Google.Apis.Auth (>= 1.76.0)
- Soenneker.Dictionaries.SingletonKeys (>= 4.0.125)
- Soenneker.Utils.File (>= 4.0.2230)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Google.Credentials:
| Package | Downloads |
|---|---|
|
Soenneker.Google.IndexingService
An async thread-safe singleton for the Google indexing service client |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2568 | 0 | 8/30/2026 |
| 4.0.2567 | 0 | 8/29/2026 |
| 4.0.2565 | 20 | 8/29/2026 |
| 4.0.2564 | 25 | 8/29/2026 |
| 4.0.2563 | 33 | 8/29/2026 |
| 4.0.2562 | 98 | 8/26/2026 |
| 4.0.2561 | 61 | 8/26/2026 |
| 4.0.2560 | 65 | 8/26/2026 |
| 4.0.2559 | 136 | 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 | 140 | 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 |
| 4.0.2549 | 122 | 8/12/2026 |
| 4.0.2548 | 133 | 8/9/2026 |
Loading failed
Update dependency Soenneker.Dictionaries.SingletonKeys to 4.0.125 (#3091)