Skip to content
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

added otp form and backend action , admin auth is now fully functional #282

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

ShivanshPlays
Copy link
Contributor

@ShivanshPlays ShivanshPlays commented Nov 10, 2024

Summary

This PR introduces a new server action for admin functionalities and an OTP form to improve the security and user experience for the admin login process. The changes also include backend modifications to properly handle OTP verification and the handling of the OTP logic on the server side. These updates enhance the login security and overall admin management experience.


Key Enhancements and Changes

1. Server Action for Admin Authentication

  • Objective: Implement server-side actions to handle admin authentication more securely and efficiently.
  • Implementation:
    • Created a server action to handle admin login, which securely verifies the admin's credentials.
    • Integrated OTP (One-Time Password) logic to add an additional layer of security for the admin login process.
    • Ensured that the server-side logic manages OTP generation, validation, and expiration.
    • Error handling has been implemented for both failed login attempts and expired OTPs.

2. OTP Form for Admin Login

  • Objective: Develop a secure OTP-based login system for admins to ensure enhanced security during the authentication process.
  • Implementation:
    • Designed and developed the OTP form that prompts admins to enter the OTP sent to their registered email or phone number.
    • The form validates the OTP against the server-side stored value and allows access upon successful verification.
    • Included error handling to display appropriate messages for incorrect OTP or expired OTP attempts.
    • Incorporated visual feedback, such as loading states and success/error alerts, to improve the user experience.

3. Backend Modifications

  • Objective: Ensure seamless interaction between the frontend OTP form and the backend server action logic.
  • Implementation:
    • Modified the backend to accommodate OTP generation and verification.
    • Integrated the OTP logic with the admin login process to ensure that only admins with valid OTPs can access the admin dashboard.
    • Implemented security measures to prevent brute force attacks on the OTP generation process.

PR2 #268

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Thank you for contributing to this project, your support is much appreciated.

Stay awesome! 😎

@Vimall03 Vimall03 merged commit c3a099b into Vimall03:main Nov 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants