Feat access login#18
Merged
Merged
Conversation
added 9 commits
December 28, 2025 01:24
…error handling - Exported FormFieldError from the auth module for better error management in forms. - Updated login-form.tsx to include validation using react-hook-form and zod. - Implemented error handling for email and password fields, displaying relevant messages. - Improved user experience by disabling the login button during submission and providing feedback on login status.
…ndling - Added `next-themes` and `sonner` packages for improved theming and toast notifications. - Updated `layout.tsx` to include a `Toaster` component for displaying notifications. - Refined `useLogin` hook to provide success and error feedback using toast notifications. - Cleaned up `login-form.tsx` by removing unnecessary error handling code for a more streamlined user experience.
…sistency - Replaced AuthTemplate with AuthLayout in ForgotPasswordPage, LoginPage, and RegisterPage for a unified layout structure. - Updated auth-form-layout to enhance the layout and visual representation of authentication forms. - Streamlined imports and improved code clarity across affected files.
…consistency - Updated ForgotPasswordForm and RegisterForm components to use AuthFormLayout for a unified structure. - Streamlined imports and removed unnecessary elements for cleaner code. - Enhanced documentation for better clarity and understanding of the components.
…ling - Updated API configuration to remove ReqRes references and focus on MockAPI. - Modified login and registration services to interact with MockAPI endpoints. - Enhanced user data handling by including user ID in session storage. - Improved error handling for user registration to prevent duplicate accounts.
- Integrated react-hook-form and zod for form management and validation in RegisterForm component. - Added fields for name, email, password, and confirm password with appropriate validation messages. - Enhanced user experience by disabling the submit button during registration and providing feedback on the registration status. - Introduced registerSchema for structured validation of registration data.
…g logic in auth service - Changed MOCKAPI_PROJECT_ID to MOCKAPI_URL for improved clarity in API configuration. - Updated endpoints in API_CONFIG to utilize the new MOCKAPI_URL. - Refactored login and registration methods in auth service to fetch all users and filter on the client side, enhancing performance and code readability. - Improved email comparison in user search to be case-insensitive.
- Updated LoginForm component to improve structure and readability, including consistent formatting and removal of unnecessary whitespace. - Integrated QueryClientProvider in tests for better handling of asynchronous data fetching. - Enhanced session management by updating saveSession function to store user email and name alongside the token and user ID. - Added utility functions to retrieve user email and name from localStorage for improved user data handling. - Cleaned up unused imports and streamlined error handling in form components.
…types.ts for cleaner code.
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.
No description provided.