-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Authentication and API Handling Features with New Implementations #3
Merged
Conversation
This file contains 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
- Include 'fix-**' branches in GitHub Actions trigger events - Extend preview deployment to 'fix-' branches - Maintain existing workflow for 'feature/' branches and production deployment
…s and use NextResponse for API responses
…Response for responses
…d switch to NextResponse
… adopt NextResponse
…ilize NextResponse
…implement NextResponse
…h to NextResponse
- NextResponse for consistent API responses - Removed x-user-id and x-user-role headers - implementing authenticateUser method for authorization. 🔒✨
- Moved and reorganized types and interfaces for better structure - Updated API calling methods to improve consistency across roles - Applied changes for auth, admin, doctor, patient, receptionist, and hospital modules
- Added etchHandler to handle API requests with customizable options - Support for headers, caching, and revalidation logic - Integrated session-based authorization using Bearer tokens - Improved error handling with detailed error structure (title, message, stackTrace)
…hParams, and cookies 🛠️
… type safety 🛡️ - Added API method for fetching admin data using fetchHandler - Improved type safety with Admin type definition - Integrated session token for authorization and cache control
… session handling 🩺 - Added API function to retrieve doctor data using fetchHandler - Ensured type safety for doctor data structure - Included session token for authentication and used no-cache policy
…andling 🔍 - Added API method to fetch patient data using fetchHandler - Applied stricter type safety for patient data structure - Included session token in API calls for secure access
…ken passing 📋 - Implemented API method for fetching receptionist data using fetchHandler - Improved type safety for receptionist data handling - Used session token for secure API calls and enhanced error handling
…and session handling 🏥 - Added API method for fetching hospital data using fetchHandler - Ensured type safety for hospital data structures - Passed session token for secure API requests and used cache control options
- Added error handling for expired and invalid JWT tokens - Used AppError to throw appropriate HTTP status codes for authentication errors - Improved logging for unauthorized access and token decryption failures
…st notifications 🚀 - Added demo user login functionality using fetchHandler for API calls - Integrated toast notifications for login status (loading, success, error) - Improved error handling and user feedback for demo login process
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.
Title:
✨ Enhance Authentication and API Handling Features with New Implementations
Description:
This pull request introduces several improvements and new features related to authentication and API handling across the application. Key changes include:
🔐 Authentication Enhancements:
fetchHandler
for secure API calls and enhanced type safety.fetchHandler
, which improves security and user feedback during the verification process.🛠️ Custom Fetch Handler:
fetchHandler
with TypeScript types for better maintainability and error handling in API requests.👥 Role-Based API Methods:
fetchHandler
, ensuring consistent and secure data fetching across modules.These changes significantly enhance the overall security, user experience, and maintainability of the application, laying a strong foundation for future features. 🚀