-
Notifications
You must be signed in to change notification settings - Fork 399
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
Adding Two-Factor Authentication (2FA) in Strapi with Users and Permissions via Email and Authenticator App #1568
Comments
Hi @emekaemego , Could you please be more specific about the idea you are proposing. Do you want to extend Strapi by creating an OTP-based User Sign-Up with and email provider using Strapi? |
Hi @Theodore-Kelechukwu-Onyejiaku , Yes, I want to extend Strapi by creating an OTP-based user Sign-In with the email provider using Strapi. To simplify:
|
Thank you. Please proceed. |
Hi @Theodore-Kelechukwu-Onyejiaku, My draft is ready for review: Adding Two-factor Authentication in Strapi 5 with Email and Authenticator App : Part 1 https://hackmd.io/@emeka/r1u3gwlxyx Thank you. |
Thank you @emekaemego! I will now add this to the review backlog. Thank you for your contribution 💪 |
Hi @emekaemego , Thank you for your interesting article. Could you please ping me the following details on Discord:
Thank you! |
Done. Thanks. |
This has been published. Thank you for your contribution @emekaemego . |
What is your article idea?
In this tutorial, I will guide readers in in adding two-factor authentication (2FA) via email and authenticator apps to Strapi application by extending the Users and Permissions plugin. I will walk through the process of adding 2FA to enhance the security of user authentication, while explaining the backend and frontend implementations.
The article will describe how to override and extend the default register and login actions, and routes of the Users and Permissions plugin with custom controller and actions, create a custom Content Type for managing email-based one-time passwords (OTP), and extend the User and Permissions model to handle Time-based One-Time Password (TOTP) information. The tutorial will cover generating and validating TOTP codes for authenticator apps like Google Authenticator and enabling QR code display on the frontend to make the process user-friendly.
Also, the tutorial will introduce and explain what 2FA and TOTP are, describe different approaches of extending the register and callback actions for implementing 2FA, and explain why the chosen method.
The article will cover:
What are the objectives of your article?
The key objectives of this article are:
Readers will learn how to customize and extend the default Users and Permissions plugin by adding two-factor authentication (2FA) to improve security for users' accounts.
The article will help readers through building both backend and frontend (Next.js) application, including OTP via email, TOTP generation and validation, and frontend QR code enrolment and validation for authenticator apps.
The article will explain what 2FA is and how it works, along with an introduction to TOTP, explaining the needs of adding these features for secure authentication systems.
Readers will see practical steps to improve user authentication through a detailed 2FA system, including the implementation of email OTP and TOTP for authenticator apps.
Readers will learn how to create custom controllers, work with Server API, Entity Service API, Routes override, and some other useful Strapi customizations APIs.
What is your expertise as a developer or writer?
Advance
What type of post is this?
Tutorial
Terms & Conditions
The text was updated successfully, but these errors were encountered: