Implement simple authentication system with hardcoded credentials#11
Draft
Implement simple authentication system with hardcoded credentials#11
Conversation
…d for user Manas Malla Co-authored-by: ManasMalla <38750492+ManasMalla@users.noreply.github.com>
Co-authored-by: ManasMalla <38750492+ManasMalla@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement a simple authentication system
Implement simple authentication system with hardcoded credentials
Sep 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a complete authentication system for DigiHero with the specified dummy credentials:
Implementation Overview
The authentication system integrates seamlessly with the existing app architecture using the Provider pattern and Hive storage. The implementation includes:
Core Components
AuthService - A new service that handles authentication logic with hardcoded credential validation. It manages user state, provides login/logout functionality, and persists authentication status using the existing Hive storage infrastructure.
User Model - A simple data model representing authenticated users with JSON serialization for persistent storage and immutable design following Flutter best practices.
LoginScreen - A beautiful animated login interface that matches DigiHero's existing design language, featuring form validation, error handling, password visibility toggle, and smooth navigation integration.
App Flow Integration
The authentication flow has been integrated into the existing app navigation:
Key Features
Testing
The implementation includes comprehensive unit tests covering authentication flows, user model serialization, and edge cases. The system properly handles invalid credentials with user-friendly error messages.
The authentication system is now ready for use with the specified credentials, providing a foundation for future authentication enhancements while maintaining the app's educational focus and user-friendly design.
Fixes #10.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.