Cross-platform .NET MAUI library for unified credential management on Android and iOS.
dotnet add package Kebechet.Maui.CredentialManagerbuilder.Services.AddCredentialManagerService(options =>
{
options.GoogleServerClientId = "xxx.apps.googleusercontent.com";
options.AppleServiceId = "com.myapp.auth";
options.AppleRedirectUri = "https://myserver.com/auth/apple/callback";
options.Ios.GoogleClientId = "yyy.apps.googleusercontent.com";
options.Ios.GoogleRedirectUri = "com.myapp:/oauth2redirect";
options.Android.AppleCallbackScheme = "com.myapp:/applecallback";
});@inject ICredentialManagerService CredentialManagerService
// Save password
await CredentialManagerService.CreatePasswordCredential(
new PasswordCredentialDto { Id = "user@example.com", Password = "secret" },
cancellationToken);
// Retrieve password
var result = await CredentialManagerService.GetPasswordCredential(cancellationToken);
// SSO (Google on Android, Apple on iOS by default)
var ssoResult = await CredentialManagerService.ContinueWithSso(
SsoProvider.PlatformDefault, cancellationToken);
// Clear credential state
await CredentialManagerService.ClearCredentialState(cancellationToken);| Feature | Android | iOS |
|---|---|---|
| Password credentials | Credential Manager API | Keychain Services |
| Google Sign-In | Native (Credential Manager) | WebAuthenticator |
| Apple Sign-In | WebAuthenticator | Native (ASAuthorization) |
| Clear credential state | ClearCredentialState API | Keychain removal |
