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

OTP Authentication #14

Merged
merged 102 commits into from
Feb 1, 2024
Merged

OTP Authentication #14

merged 102 commits into from
Feb 1, 2024

Conversation

ArinNigam
Copy link
Contributor

User Authentication using OTP


  • Used nodemailer and gmail service to create a SMTP server.
  • OTP is being stored in MongoDB database and if there is existing OTP for the same account it will delete the same and update it with the new one.
  • Send OTP to the user email.
  • Verify the OTP and delete it from the database.
  • After verifying the otp a jwt token is being generated as a response.
  • I have merged the PR of Admin Functions #13 and it doesn't conflict with my branch.
  • Merged signin and signup as one resource point under OTPAuth only since we are just taking email as a request from user.

For now email is being sent to the user from my personal gmail by the use of generating app password for the same.
Do you have any suggestions regarding the emails which are sent by personal id. Can we create a different gmail account and do the same till the developing phase.
requesting review @henilp105 @tusharbansal22


Screenshot 2024-01-31 at 10 13 46 AM Screenshot 2024-01-31 at 10 13 46 AM Screenshot 2024-01-31 at 10 13 46 AM Screenshot 2024-01-31 at 10 13 46 AM Screenshot 2024-01-31 at 10 16 38 AM

Future PR

  • For future PRs there would be an option for the user to login as Student, Faculty or Admin on the login page
  • Working on improving the UI of the login page

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add it to .gitignore.

@@ -1,4 +1,4 @@
export const senderEmail = 'college@gmail.com';
export const senderEmail = 'arin.nigam@gmail.com';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please take email as an env variable.

@ArinNigam
Copy link
Contributor Author

@henilp105 changes are applied.

@henilp105 henilp105 merged commit f97f117 into OpenLake:main Feb 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants