Skip to content

Commit

Permalink
Merge pull request #409 from haseebzaki-07/otp
Browse files Browse the repository at this point in the history
Otp verification for registration
  • Loading branch information
RamakrushnaBiswal authored Oct 28, 2024
2 parents 23b3853 + 563b8a7 commit 04c874f
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 112 deletions.
140 changes: 40 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,10 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
</a>
</td>
<td align="center">
<a href="https://github.com/jainaryan04">
<img src="https://avatars.githubusercontent.com/u/138214350?v=4" width="100;" alt="jainaryan04"/>
<br />
<sub><b>Aryan Ramesh Jain</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/haseebzaki-07">
<img src="https://avatars.githubusercontent.com/u/147314463?v=4" width="100;" alt="haseebzaki-07"/>
<a href="https://github.com/alo7lika">
<img src="https://avatars.githubusercontent.com/u/152315710?v=4" width="100;" alt="alo7lika"/>
<br />
<sub><b>Haseeb Zaki</b></sub>
<sub><b>alolika bhowmik</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -280,52 +273,29 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Ashwini_ab</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/alo7lika">
<img src="https://avatars.githubusercontent.com/u/152315710?v=4" width="100;" alt="alo7lika"/>
<a href="https://github.com/itznayan">
<img src="https://avatars.githubusercontent.com/u/136584376?v=4" width="100;" alt="itznayan"/>
<br />
<sub><b>alolika bhowmik</b></sub>
<sub><b>Mahera Nayan</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/tejasbenibagde">
<img src="https://avatars.githubusercontent.com/u/124677750?v=4" width="100;" alt="tejasbenibagde"/>
<br />
<sub><b>Tejas Benibagde</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/itznayan">
<img src="https://avatars.githubusercontent.com/u/136584376?v=4" width="100;" alt="itznayan"/>
<br />
<sub><b>Mahera Nayan</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Shirisha-16">
<img src="https://avatars.githubusercontent.com/u/148051550?v=4" width="100;" alt="Shirisha-16"/>
<br />
<sub><b>Tyarla Shirisha</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/meghanakn22">
<img src="https://avatars.githubusercontent.com/u/172406754?v=4" width="100;" alt="meghanakn22"/>
<br />
<sub><b>meghanakn22</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/VinayLodhi1712">
<img src="https://avatars.githubusercontent.com/u/135756009?v=4" width="100;" alt="VinayLodhi1712"/>
<br />
<sub><b>Vinay Anand Lodhi</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Amnyadav">
<img src="https://avatars.githubusercontent.com/u/127370497?v=4" width="100;" alt="Amnyadav"/>
Expand All @@ -341,17 +311,10 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
</a>
</td>
<td align="center">
<a href="https://github.com/Suhas-Koheda">
<img src="https://avatars.githubusercontent.com/u/72063139?v=4" width="100;" alt="Suhas-Koheda"/>
<br />
<sub><b>Suhas Koheda</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Sumanbhadra">
<img src="https://avatars.githubusercontent.com/u/93245252?v=4" width="100;" alt="Sumanbhadra"/>
<a href="https://github.com/haseebzaki-07">
<img src="https://avatars.githubusercontent.com/u/147314463?v=4" width="100;" alt="haseebzaki-07"/>
<br />
<sub><b>Suman Bhadra</b></sub>
<sub><b>Haseeb Zaki</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -361,20 +324,20 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Sawan kushwah </b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/PavanTeja2005">
<img src="https://avatars.githubusercontent.com/u/98730339?v=4" width="100;" alt="PavanTeja2005"/>
<a href="https://github.com/Suhas-Koheda">
<img src="https://avatars.githubusercontent.com/u/72063139?v=4" width="100;" alt="Suhas-Koheda"/>
<br />
<sub><b>PavanTeja2005</b></sub>
<sub><b>Suhas Koheda</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/sajalbatra">
<img src="https://avatars.githubusercontent.com/u/125984550?v=4" width="100;" alt="sajalbatra"/>
<a href="https://github.com/Jay-1409">
<img src="https://avatars.githubusercontent.com/u/166749819?v=4" width="100;" alt="Jay-1409"/>
<br />
<sub><b>Sajal Batra</b></sub>
<sub><b>Jay shah</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -385,10 +348,17 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
</a>
</td>
<td align="center">
<a href="https://github.com/Jay-1409">
<img src="https://avatars.githubusercontent.com/u/166749819?v=4" width="100;" alt="Jay-1409"/>
<a href="https://github.com/sajalbatra">
<img src="https://avatars.githubusercontent.com/u/125984550?v=4" width="100;" alt="sajalbatra"/>
<br />
<sub><b>Jay shah</b></sub>
<sub><b>Sajal Batra</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/PavanTeja2005">
<img src="https://avatars.githubusercontent.com/u/98730339?v=4" width="100;" alt="PavanTeja2005"/>
<br />
<sub><b>PavanTeja2005</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -398,22 +368,29 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Abhijit Motekar</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Navneetdadhich">
<img src="https://avatars.githubusercontent.com/u/156535853?v=4" width="100;" alt="Navneetdadhich"/>
<br />
<sub><b>Navneet Dadhich</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/VinayLodhi1712">
<img src="https://avatars.githubusercontent.com/u/135756009?v=4" width="100;" alt="VinayLodhi1712"/>
<br />
<sub><b>Vinay Anand Lodhi</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/lade6501">
<img src="https://avatars.githubusercontent.com/u/83055827?v=4" width="100;" alt="lade6501"/>
<br />
<sub><b>Vishal Lade</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/REHAN-18">
<img src="https://avatars.githubusercontent.com/u/143922855?v=4" width="100;" alt="REHAN-18"/>
Expand All @@ -435,13 +412,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Aditya Bakshi</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/vaishnavipal1869">
<img src="https://avatars.githubusercontent.com/u/180996531?v=4" width="100;" alt="vaishnavipal1869"/>
<br />
<sub><b>vaishnavipal1869</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/tanishirai">
<img src="https://avatars.githubusercontent.com/u/178164785?v=4" width="100;" alt="tanishirai"/>
Expand All @@ -456,8 +428,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Sushree Manaswini Biswal</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Sourabh782">
<img src="https://avatars.githubusercontent.com/u/103349890?v=4" width="100;" alt="Sourabh782"/>
Expand All @@ -472,27 +442,13 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Shiva Bajpai</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Pushpa472">
<img src="https://avatars.githubusercontent.com/u/116655535?v=4" width="100;" alt="Pushpa472"/>
<br />
<sub><b>Pushpa Vishwakarma </b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/devxMani">
<img src="https://avatars.githubusercontent.com/u/122438942?v=4" width="100;" alt="devxMani"/>
<br />
<sub><b>MANI </b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/meghanakn473">
<img src="https://avatars.githubusercontent.com/u/165137755?v=4" width="100;" alt="meghanakn473"/>
<br />
<sub><b>K N Meghana</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Ayush215mb">
<img src="https://avatars.githubusercontent.com/u/154300084?v=4" width="100;" alt="Ayush215mb"/>
Expand Down Expand Up @@ -546,13 +502,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Nikhil0-3">
<img src="https://avatars.githubusercontent.com/u/149102391?v=4" width="100;" alt="Nikhil0-3"/>
<br />
<sub><b>Nikhil More</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/MutiatBash">
<img src="https://avatars.githubusercontent.com/u/108807732?v=4" width="100;" alt="MutiatBash"/>
Expand All @@ -574,22 +523,13 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
<sub><b>Jai Dhingra</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/harjasae2001">
<img src="https://avatars.githubusercontent.com/u/83627055?v=4" width="100;" alt="harjasae2001"/>
<br />
<sub><b>Harjas Singh</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/mishradev1">
<img src="https://avatars.githubusercontent.com/u/118660840?v=4" width="100;" alt="mishradev1"/>
<br />
<sub><b>Dev Mishra</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/chikatlarakesh">
<img src="https://avatars.githubusercontent.com/u/178009894?v=4" width="100;" alt="chikatlarakesh"/>
Expand Down
31 changes: 30 additions & 1 deletion backend/config/nodemailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,33 @@ exports.sendVerificationMail = async (email, verificationCode) => {
}
}

}
}


exports.sendRegisterVerificationMail = async (email, verificationCode) => {
const emailText = `
Dear Customer,
Please use this verification code for verifying your account. Here's your code':
RCode: ${verificationCode}
Thank you for choosing our service. We are happy to help you.
Best regards,
PlayCafe
`;

try {
await transporter.sendMail({
from: process.env.EMAIL_USER,
to: email,
subject: 'Your OTP Verification Code',
text: emailText,
});
} catch (error) {
console.error("Error sending OTP email:", error);
throw new Error("Failed to send OTP email");
}
}

Loading

0 comments on commit 04c874f

Please sign in to comment.