A modern Android login application implementing KeyAuth API v1.3 authentication with Material Design principles.
- π KeyAuth API v1.3 Integration - License key authentication (no application secret required)
- π¨ Modern Material Design UI - Dark theme with clean, professional interface
- πΎ Secure Storage - Encrypted storage for license keys using Android Security Crypto
- π Auto-Login Support - Remember license keys and automatic authentication
- π± Mobile-Optimized - Responsive design for Android devices
- π‘οΈ Security Features - Hardware ID generation and secure network communication
The app features a modern dark theme login interface similar to the reference design with:
- Circular app logo with bear mascot
- License key input field with paste functionality
- Remember Key and Automatic Login checkboxes
- Material Design buttons and components
- Loading states and error handling
Before building the app, you need to configure your KeyAuth application details:
- Visit KeyAuth Dashboard
- Create or select your application
- Note down the following details:
- Application Name: Found on the main application page
- Owner ID: Click your profile picture β Account Settings
- Application Version: Should match your KeyAuth dashboard version
Edit app/src/main/java/com/bearmod/loader/config/KeyAuthConfig.kt:
object KeyAuthConfig {
// Replace with your actual KeyAuth application details
const val APP_NAME = "your-app-name" // Your application name
const val OWNER_ID = "your-owner-id" // Your owner ID
const val APP_VERSION = "1.3" // Your app version
const val API_BASE_URL = "https://keyauth.win/api/1.3/" // API endpoint
const val APP_DISPLAY_NAME = "YOUR-APP" // Display name in UI
const val APP_DISPLAY_VERSION = "1.0.0" // Display version
}- Open the project in Android Studio
- Sync the project to download dependencies
- Build and run on your device or emulator
app/src/main/java/com/keyauth/loader/
βββ config/
β βββ KeyAuthConfig.kt # Configuration constants
βββ data/
β βββ api/
β β βββ KeyAuthApiService.kt # Retrofit API interface
β βββ model/
β β βββ KeyAuthResponse.kt # Data models
β βββ repository/
β βββ KeyAuthRepository.kt # Repository pattern implementation
βββ network/
β βββ NetworkFactory.kt # Network components factory
βββ ui/
β βββ LoginActivity.kt # Login screen
β βββ MainActivity.kt # Main app screen
β βββ login/
β βββ LoginViewModel.kt # Login ViewModel
βββ utils/
βββ NetworkResult.kt # Network result wrapper
βββ SecurePreferences.kt # Encrypted preferences
- Retrofit 2 - HTTP client for API communication
- OkHttp 3 - HTTP client with logging
- Material Components - Material Design UI components
- Android Security Crypto - Encrypted SharedPreferences
- Kotlin Coroutines - Asynchronous programming
- AndroidX Lifecycle - ViewModel and LiveData
This implementation uses KeyAuth API v1.3 which includes:
- β No Application Secret Required - Simplified authentication flow
- β License Key Authentication - Direct license validation
- β Hardware ID Generation - Device-specific identification
- β Session Management - Secure session handling
- β Error Handling - Comprehensive error responses
- Encrypted Storage: License keys are stored using Android's EncryptedSharedPreferences
- Hardware ID: Unique device identification using Android ID and device info
- Network Security: HTTPS communication with certificate pinning support
- Input Validation: Client-side validation for license keys
- Session Management: Secure session token handling
Colors can be customized in app/src/main/res/values/colors.xml:
- Dark background colors
- Primary blue accent
- Error and success states
- Text colors for different states
All user-facing text is in app/src/main/res/values/strings.xml for easy localization.
Replace the bear logo in app/src/main/res/drawable/ic_bear_logo.xml with your own app icon.
The app communicates with KeyAuth API v1.3 endpoints:
POST /- Initialize applicationPOST /- License authenticationPOST /- Session validationPOST /- Fetch application statsPOST /- Log user activity
The app handles various error scenarios:
- Network connectivity issues
- Invalid license keys
- Expired licenses
- Server errors
- Initialization failures
This project is provided as an example implementation. Please ensure compliance with KeyAuth's licensing terms when using in production applications.
For KeyAuth-specific issues, visit:
For Android development issues, refer to the Android documentation or create an issue in this repository.
Generated: 2025-10-30T06:15:09.324Z
Open PRs: 0
Open PRs by age:
- <= 7 days: 0
- <= 14 days: 0
- <= 30 days: 0
-
30 days: 0
Mean time to merge (last 30 days): 0.00 days Median time to merge (last 30 days): 0.00 days Average review comments (merged PRs): 0.00
Workflow runs (last 30 days): 22 Pass rate: 77%
Open issues: 0 Open issues by age:
- <= 7 days: 0
- <= 14 days: 0
- <= 30 days: 0
-
30 days: 0
Stale issues (> 60 days): 0