Getting Started
Learn how to use the @perseidesjs/auth-otp
plugin in your Medusa app
@perseidesjs/auth-otp enables OTP (One-Time Password) authentication in your Medusa applications, enhancing security and providing an alternative to traditional password-based authentication.
Try it out
Try it out on the demo app
Prerequisites
Before using the plugin, ensure you have:
- Medusa v2.3.0 or later (plugins were introduced in this version)
- A Medusa application already set up and running
Understanding Auth-OTP
Traditional password-based authentication has several limitations:
- Users forget passwords
- Password reuse leads to security vulnerabilities
- Account recovery processes can be cumbersome
OTP authentication generates a unique, time-limited code for each authentication attempt. This plugin implements OTP functionality through well-defined workflows within the Medusa framework, enabling passwordless authentication flows.
Installation
We can now install the plugin:
Add the plugin to your Medusa application in the medusa-config.ts
file:
Next Steps
Ready to use the plugin? Let’s dive into the “Basic usage”.
Was this page helpful?