diff --git a/README.md b/README.md new file mode 100644 index 0000000..2c9f9cf --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# OTP with meme image + +Leisure project. A REST API that sends a one-time authentication code (a.k.a OTP) but the code is in the text of a meme image. + +## Summary + +If it works perfectly the result will be like this: + +![Example Outpus](./docs/example.png) + +## Why this meme? + +The meme used in this project is Shannon Smiling or better known as *The Guy Smiling And Wearing A Suit*, which is often paired with a negative text or _"My Reaction For That Information"_. + +![Guy with suit](./docs/guy-with-suit.gif) + +the reason why I chose this meme was inspired by a meme where a man screenshot the OTP sender's chat and he replied by sending a photo of himself posing cool. suddenly it gave me the idea to make an OTP system by sending pictures of people posing cool with the OTP code text. + +Idk why I chose the photo of Shannon smiling, it's because I think with the meme photo of Shannon in addition to making a sense of humor but also as a sign of welcome and strengthens security. \ No newline at end of file diff --git a/docs/example.png b/docs/example.png new file mode 100644 index 0000000..850c220 Binary files /dev/null and b/docs/example.png differ diff --git a/docs/guy-with-suit.gif b/docs/guy-with-suit.gif new file mode 100644 index 0000000..5dfe44d Binary files /dev/null and b/docs/guy-with-suit.gif differ diff --git a/main.py b/main.py index 3e2ebcd..6a0730a 100644 --- a/main.py +++ b/main.py @@ -30,7 +30,10 @@ def hello(): @app.route('/send-otp', methods=['POST']) def send_email(): - mail_sender = "norman25.projects2@gmail.com" + # Create an .env file at the root of this project + # There are two values required here, EMAIL_SENDER_2 and EMAIL_PASSWORD_2 + # Or you can change the value here and in .env file + mail_sender = os.environ.get("EMAIL_SENDER_2") mail_password = os.environ.get("EMAIL_PASSWORD_2") mail_receiver = request.args.get('email')