flutter_freedome_authentication
Это содержимое пока не доступно на вашем языке.
1.2.0+ is a facade over
freedome_client. New code should use the client directly — see doc/migration-to-freedome_client.md.
FreeDome authentication library for Flutter applications.
Features
Section titled “Features”- User authentication (login/logout)
- User registration
- Password management (change/reset)
- Token management (access/refresh tokens)
- Secure password hashing
- Persistent authentication state
Installation
Section titled “Installation”Add this to your package’s pubspec.yaml file:
dependencies: flutter_freedome_authentication: ^1.0.0Authentication Service
Section titled “Authentication Service”import 'package:flutter_freedome_authentication/flutter_freedome_authentication.dart';
final authService = FreeDomeAuthService(baseUrl: 'https://api.example.com');
// Loginfinal result = await authService.login( username: 'user@example.com', password: 'password123',);
if (result.success) { print('Logged in as: ${result.user?.displayName}');}
// Logoutawait authService.logout();Registration Service
Section titled “Registration Service”final registrationService = FreeDomeRegistrationService(baseUrl: 'https://api.example.com');
// Register new userfinal result = await registrationService.register( RegistrationRequest( username: 'newuser', email: 'user@example.com', password: 'password123', firstName: 'John', lastName: 'Doe', metadata: {}, ),);Password Service
Section titled “Password Service”final passwordService = FreeDomePasswordService(baseUrl: 'https://api.example.com');
// Change passwordawait passwordService.changePassword( currentPassword: 'oldpassword', newPassword: 'newpassword', accessToken: 'your_access_token',);
// Request password resetawait passwordService.requestPasswordReset('user@example.com');API Reference
Section titled “API Reference”Models
Section titled “Models”FreeDomeUser- User model with profile informationAuthResult- Authentication result with success/error statusRegistrationRequest- User registration dataPasswordChangeRequest- Password change dataPasswordResetRequest- Password reset data
Services
Section titled “Services”FreeDomeAuthService- Main authentication serviceFreeDomeRegistrationService- User registration serviceFreeDomePasswordService- Password management service
Events
Section titled “Events”UserLoggedInEvent- Fired when user logs inUserLoggedOutEvent- Fired when user logs outUserRegisteredEvent- Fired when user registersPasswordChangedEvent- Fired when password is changed
License
Section titled “License”NativeMindNONC — see the LICENSE file.
Commercial use → NativeMind sales