kiss_login library

Kiss Auth Login Module

Provides credential-based authentication interfaces for external providers. This module handles the "how do I get a token?" part of authentication.

For token validation (the "is this token valid?" part), use the kiss_authentication module.

For authorization checks (the "what can this user do?" part), use the kiss_authorization module.

Usage

import 'package:kiss_auth/kiss_login.dart';

// Use with external provider packages:
// - kiss_auth_firebase
// - kiss_auth_pocketbase  
// - kiss_auth_auth0
// etc.

final provider = SomeExternalLoginProvider();
final loginService = LoginService(provider);

// Login with username/password
final result = await loginService.loginWithPassword('user', 'password');
if (result.isSuccess) {
  print('Access token: ${result.accessToken}');
  print('User: ${result.user?.userId}');
}

Classes

AnonymousCredentials
Anonymous credentials (for guest/anonymous login)
ApiKeyCredentials
API key credentials
EmailPasswordCredentials
Email and password credentials
InMemoryLoginProvider
Simple in-memory login provider for testing and demos
LoginCredentials
Abstract base class for login credentials
LoginProvider
Abstract interface for login providers
LoginResult
Result of a login attempt
LoginService
Service class that coordinates login operations
OAuthCredentials
OAuth token credentials
PasswordResetResult
Result of a password reset request
TestUser
Test user data structure for in-memory provider
UserCreationCredentials
User creation credentials for email/password registration
UsernamePasswordCredentials
Username and password credentials
UserProfile
Basic user identity information returned after successful authentication