feat(mobile-auth): implement email login and registration with form v…#148
Merged
Oluwaseyi89 merged 8 commits intoNFTopia-Foundation:mainfrom Apr 1, 2026
Conversation
|
@fadee26 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
@fadee26 why are you closing 2 issues with one PR? Separate the implementation and open their respective PRs |
Contributor
|
@fadee26 please, resolve the merge conflict. |
Contributor
Author
|
@Oluwaseyi89 please merge |
Contributor
|
@fadee26 please, resolve the merge conflict. This branch will now be prioritize for merge. |
Contributor
Author
|
@Oluwaseyi89 please review |
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.
Email Authentication Implementation with Form Validation
Overview
This PR implements comprehensive email login and registration screens with real-time form validation for the NFTopia mobile app. The implementation includes reusable validation components, password strength indicator, and full integration with the existing AuthStore.
Changes
New Components
FormInput (
screens/Auth/components/FormInput.tsx)PasswordStrengthIndicator (
screens/Auth/components/PasswordStrengthIndicator.tsx)ValidationError (
screens/Auth/components/ValidationError.tsx)Validation Utilities
Created comprehensive validation functions in
screens/Auth/utils/validation.ts:validateEmail: Format validation, max 255 chars, RFC 5322 compliantvalidatePassword: Min 8 chars, 1 number, 1 uppercase, 1 special charvalidateUsername: 3-20 alphanumeric characters (underscores allowed)validateConfirmPassword: Must match password fieldUpdated Screens
Testing
validation.test.ts) with 25+ test casesDocumentation
Technical Details
Framework: React Native with Expo
State Management: Zustand (AuthStore)
Navigation: React Navigation (Native Stack)
Language: TypeScript
Integration Points
Acceptance Criteria
Login Screen
✅ Email input field with validation
✅ Password input field with secure entry
✅ "Login" button with loading indicator
✅ "Sign Up" navigation link
✅ "Forgot Password?" link (placeholder)
✅ Real-time error clearing
✅ API error display via AuthStore
Registration Screen
✅ Username input (alphanumeric, 3-20 chars)
✅ Email input with format validation
✅ Password input with strength indicator
✅ Confirm password input with match validation
✅ "Create Account" button with loading indicator
✅ "Already have an account? Sign In" link
✅ Terms of Service agreement
✅ Real-time error clearing
Validation Rules
✅ Email: Valid format, max 255 chars
✅ Password: Min 8 chars, 1 number, 1 uppercase, 1 special char
✅ Username: 3-20 alphanumeric characters
✅ Confirm Password: Matches password
General Requirements
✅ Loading indicator during submission
✅ Successful login/registration navigates to main app (ready for integration)
✅ Navigation between login and registration works
✅ Form validation tests passing
✅ TypeScript types properly defined
closes #118
closes #119