For Simple 2 Step Implementation checkout official documentation
This implementation goes a little beyond bare minimum, and adds modularity, scalability and reusability of the auth process
- Fully implemented OTPless Auth
- Dynamic Loading of the Scripts
- Protected Routes
- Persistent Login(Local Storage+Redux)
Prerequisites:
- NodeJS
- Create an App in OTPless dashboard and copy the
APP ID
-
Clone the repo
git clone https://github.com/bytebane/OTPless-react-auth.git
-
Navigate to the directory
cd OTPless-react-auth
-
Open OTPless Helper fucnction and replace
PASTE_YOUR_APP_ID_HERE
with yourAPP ID
. -
Install Packages
npm install
-
Run the demo
npm run dev
-
Open localhost:5173 in your browser