Plumix.GoogleSignIn 7.2.0-preview.1

This is a prerelease version of Plumix.GoogleSignIn.
dotnet add package Plumix.GoogleSignIn --version 7.2.0-preview.1
                    
NuGet\Install-Package Plumix.GoogleSignIn -Version 7.2.0-preview.1
                    
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="Plumix.GoogleSignIn" Version="7.2.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plumix.GoogleSignIn" Version="7.2.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Plumix.GoogleSignIn" />
                    
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 Plumix.GoogleSignIn --version 7.2.0-preview.1
                    
#r "nuget: Plumix.GoogleSignIn, 7.2.0-preview.1"
                    
#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 Plumix.GoogleSignIn@7.2.0-preview.1
                    
#: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=Plumix.GoogleSignIn&version=7.2.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Plumix.GoogleSignIn&version=7.2.0-preview.1&prerelease
                    
Install as a Cake Tool

Plumix.GoogleSignIn

NuGet

Sign in with Google for Plumix and other .NET Android / iOS apps — a port of Flutter's google_sign_in (7.x API). It gives you the user and a Google ID token for your backend to verify.

Platform How
Android Credential Manager — the "Sign in with Google" sheet (GetSignInWithGoogleOption)
iOS Google's OAuth 2.0 with PKCE in ASWebAuthenticationSession, as the GoogleSignIn SDK does; the session is kept in the Keychain
net11.0 (desktop, tests) not supported: AuthenticateAsync throws ProviderConfigurationError

Installation

dotnet add package Plumix.GoogleSignIn

Reference it from your shared UI project (plain net11.0) or the heads: the Android and iOS heads get the platform build automatically.

Setup

In the Google Cloud console of your project create OAuth clients:

  • Web — its id is the serverClientId; on Android it is the ID token's audience.
  • Android — package name and the SHA-1 of every signing key (debug, upload, Play App Signing). Nothing goes into the app; Credential Manager matches the app by package and signature.
  • iOS — bundle id. Its id is the clientId on iOS; Google redirects to the reversed id (com.googleusercontent.apps.…:/oauth2redirect), which ASWebAuthenticationSession catches — no Info.plist entry.

Your backend accepts the ID token when its aud is one of your client ids (web, iOS).

Usage

using Plumix.GoogleSignIn;

await GoogleSignIn.Instance.InitializeAsync(
    clientId: OperatingSystem.IsIOS() ? "<ios-client-id>.apps.googleusercontent.com" : null,
    serverClientId: OperatingSystem.IsAndroid() ? "<web-client-id>.apps.googleusercontent.com" : null);

try
{
    var account = await GoogleSignIn.Instance.AuthenticateAsync();
    await backend.SignInWithGoogleAsync(account.Authentication.IdToken!);
}
catch (GoogleSignInException e) when (e.Code == GoogleSignInExceptionCode.Canceled)
{
    // the user closed the sheet
}

AttemptLightweightAuthenticationAsync() signs a returning user in with minimal UI (null when there is nobody); SignOutAsync() / DisconnectAsync() sign out.

API

Plumix.GoogleSignIn google_sign_in
GoogleSignIn.Instance GoogleSignIn.instance
InitializeAsync(clientId, serverClientId, nonce, hostedDomain) initialize(...)
AuthenticateAsync(scopeHint) authenticate(scopeHint:)
AttemptLightweightAuthenticationAsync(reportAllExceptions) attemptLightweightAuthentication(...)
SupportsAuthenticate() supportsAuthenticate()
SignOutAsync(), DisconnectAsync() signOut(), disconnect()
AuthenticationEvent, AuthenticationError events authenticationEvents stream
GoogleSignInAccount, GoogleSignInAuthentication same
GoogleSignInException, GoogleSignInExceptionCode same
GoogleSignInPlatform.Instance (replace in tests) GoogleSignInPlatform.instance

Not ported yet: the authorization client (authorizationClient — access tokens and server auth codes for scopes).

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible.  net11.0-android37.0 is compatible.  net11.0-ios27.2 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.2.0-preview.1 58 11/24/2026