authsome_core library

AuthSome authentication SDK for Dart.

Framework-agnostic core with auto-config support. Use AuthManager to manage authentication state, and ClientConfig for auto-discovery of enabled auth methods.

For Flutter apps, use the authsome_flutter package which provides AuthProvider and AuthNotifier for reactive state management.

Classes

ACSRequest
AdminAppResponse
AdminCatalogProvider
AdminCatalogResponse
AdminCreateConnectionResponse
AdminDeleteAppRequest
AdminDeleteConnectionResponse
AdminDeleteProviderResponse
AdminDeleteServiceAccountRequest
AdminDeleteUserRequest
AdminGetServiceAccountRequest
AdminGetUserRequest
AdminImpersonateRequest
AdminListConnectionsResponse
AdminListOrgsRequest
AdminListProvidersResponse
AdminListServiceAccountsRequest
AdminListUsersRequest
AdminPlatformOwnerResponse
AdminProvider
AdminProviderResponse
AdminRevokePlatformOwnerRequest
AdminServiceAccountAPIKeyResponse
AdminServiceAccountListResponse
AdminServiceAccountResponse
AdminStatsRequest
AdminStatsResponse
AdminStopImpersonationRequest
AdminUnbanUserRequest
AdminUserListResponse
AuthAuthenticated
User is authenticated.
AuthClient
Auto-generated AuthSome API client.
AuthClientConfig
Configuration for the AuthSome API client.
AuthConfig
Configuration for the AuthSome client.
AuthEmailNotVerified
Sign-in attempted but the account's email is not yet verified. The form should switch to the inline verification panel.
AuthError
An error occurred during authentication.
AuthErrorType
Standard error-category strings emitted by the AuthSome backend. Keep in sync with the TypeScript AuthClientError constants.
AuthIdle
Initial idle state before initialization.
AuthLoading
Auth is loading (sign-in, sign-up, refresh, etc.).
AuthManager
AuthManager is the core state machine that drives authentication.
AuthMethod
AuthMfaRequired
MFA challenge required before full authentication.
AuthorizeRequest
AuthResponse
AuthSomeClient
AuthSomeClient extends the auto-generated client with backward-compatible convenience methods that AuthManager depends on.
AuthState
Authentication state (sealed class for exhaustive matching).
AuthUnauthenticated
User is not authenticated.
AuthVerificationPending
Sign-up completed; awaiting email verification before the session becomes active. Mirrors React verification_pending.
BrandingConfig
BulkError
BulkImportResult
BulkRevokeSessionsRequest
BulkRevokeSessionsResponse
CallbackRequest
CallbackResponse
CancelSubscriptionRequest
ChallengeRequest
ChallengeResponse
ChangePlanRequest
CheckEntitlementRequest
CheckSlugRequest
ClientConfig
Client configuration returned by the backend.
ClientConfigBranding
ClientConfigCaptcha
ClientConfigEmailVerification
ClientConfigFieldValidation
ClientConfigMFA
ClientConfigResponse
ClientConfigSelectOption
ClientConfigSignupField
ClientConfigSocial
ClientConfigSocialProvider
ClientConfigSSO
ClientConfigSSOConnection
ClientConfigToggle
CloneEnvironmentResponse
Config
Connection
CouponResponse
CreateClientResponse
CreateCouponRequest
CreateKeyRequest
CreateKeyResponse
CreatePlanRequest
CreateSubscriptionRequest
CredentialInfo
Definition
DefinitionGroup
DeleteAccountRequest
DeleteAppClientConfigRequest
DeleteAppSessionConfigRequest
DeleteClientRequest
DeleteCouponRequest
DeleteDeviceRequest
DeleteOrgRequest
DeleteRequest
DeleteResponse
DeleteSettingRequest
DeleteTeamRequest
DeleteWebhookRequest
Device
DeviceAuthRequest
DeviceAuthResponse
DeviceCompleteRequest
DeviceCompleteResponse
DeviceListResponse
DisableRequest
DisableResponse
DiscoveryRequest
DiscoveryResponse
Email
EnrollRequest
EnrollResponse
EntitlementResponse
Environment
EnvironmentListResponse
EnvironmentSettingsResponse
ExportDataRequest
FeatureInput
ForgotPasswordResponse
GetActiveSubRequest
GetAppClientConfigRequest
GetAppSessionConfigRequest
GetClientConfigRequest
GetDeviceRequest
GetInvoiceRequest
GetMeRequest
GetOrgRequest
GetPlanRequest
GetTeamRequest
GetWebhookRequest
GroupRef
GroupResource
HealthResponse
IntrospectResponse
IntrospectUser
Invitation
InvitationListResponse
InvoiceResponse
KeyListItem
ListAuthMethodsRequest
ListAuthMethodsResponse
ListClientsRequest
ListClientsResponse
ListConsentsRequest
ListCouponsRequest
ListCouponsResponse
ListDefinitionsResponse
ListDevicesRequest
ListEnvironmentsRequest
ListInvitationsRequest
ListInvoicesRequest
ListInvoicesResponse
ListKeysRequest
ListKeysResponse
ListMembersRequest
ListNamespaceDefinitionsRequest
ListOrgsRequest
ListPlansRequest
ListPlansResponse
ListRequest
ListResponse
ListRolesRequest
ListSessionsRequest
ListSettingsDefinitionsRequest
ListSubscriptionsRequest
ListSubscriptionsResponse
ListTeamsRequest
ListWebhooksRequest
LoginBeginRequest
LoginBeginResponse
LoginFinishRequest
LoginFinishResponse
LoginRequest
LoginResponse
MagicLinkConfig
MarkInvoicePaidRequest
Member
MemberListResponse
MemberRef
MemoryTokenStorage
In-memory token storage (lost on app restart).
Meta
MfaConfig
Name
OAuth2Client
ObjectFieldDef
Organization
OrgListResponse
PasskeyAuthenticator
A platform-specific WebAuthn / passkey authenticator.
PasskeyConfig
PasswordConfig
Permission
PermissionListResponse
PlanIDRequest
PlanResponse
RecoveryRegenerateRequest
RecoveryRegenerateResponse
RecoveryVerifyRequest
RecoveryVerifyResponse
RegisterBeginRequest
RegisterBeginResponse
RegisterFinishRequest
RegisterFinishResponse
RemoveMemberRequest
ResolvedSetting
ResolvedSettingResponse
ResolvedSettingsResponse
ResolveSettingRequest
ResolveSettingsRequest
Response
RevokeKeyRequest
RevokeRequest
RevokeSessionRequest
Role
RoleListResponse
scimGroupPathParam
scimUserPathParam
ScopeValue
SelectOption
SendRequest
SendResponse
Session
Session tokens returned after authentication / refresh.
SessionListResponse
Settings
SettingValueResponse
SignOutRequest
SlugAvailableResponse
SMSSendRequest
SMSSendResponse
SmsSendResult
Result of sending an SMS code for MFA.
SMSVerifyRequest
SMSVerifyResponse
SocialConfig
SocialProviderConfig
Social provider info from the backend.
SsoConfig
SSOConnectionConfig
SSO connection info from the backend.
StartRequest
StartResponse
StatusResponse
SubIDRequest
SwitchOrgResponse
Team
TeamListResponse
TokenRequest
TokenResponse
TokenStorage
Interface for persisting tokens across sessions.
TrustDeviceRequest
UIMetadata
UnenforceSettingRequest
UnlinkAuthMethodRequest
UnlinkAuthMethodResponse
UnsupportedPasskeyAuthenticator
Default authenticator: reports isAvailable == false and throws on every call. Used as the fallback when no platform implementation is provided.
UsageItemResponse
UsageSummaryRequest
UsageSummaryResponse
User
UserInfo
UserInfoRequest
UserResource
UserRoleListResponse
Validation
VerifyMFARequest
VerifyMFAResponse
VerifyRequest
VerifyResponse
VisibilityCondition
VoidInvoiceRequest
Webhook
WebhookListResponse

Functions

prepareCreationOptions(Map<String, dynamic> options) Map<String, dynamic>
Prepare the options object returned by /v1/passkeys/register/begin for navigator.credentials.create({ publicKey }).
prepareRequestOptions(Map<String, dynamic> options) Map<String, dynamic>
Prepare the options object returned by /v1/passkeys/login/begin for navigator.credentials.get({ publicKey }) (Web) or its native equivalent.
serializeAssertion({required String id, required dynamic rawId, required String type, required dynamic clientDataJson, required dynamic authenticatorData, required dynamic signature, dynamic userHandle, String? authenticatorAttachment}) Map<String, dynamic>
Build the credential JSON payload expected by the /finish endpoints.

Exceptions / Errors

AuthClientException
Exception thrown by the AuthSome API client.