Download the PHP package egately/egate-otp without Composer
On this page you can find all versions of the php package egately/egate-otp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download egately/egate-otp
More information about egately/egate-otp
Files in egately/egate-otp
Package egate-otp
Short Description OTP Mangement Package
License MIT
Homepage https://github.com/egately/egate-otp
Informations about the package egate-otp
OTP Mangement Package
This package is used to generate and manage OTP's for users, it can be used to generate OTP's for any model you want.
What makes this package different from other OTP packages?
The special feature of this package is that the OTP generated by extending google2fa, this means that the OTP generated by this package can be used with any authenticator app.
- You can use any authenticator app to scan the QR code generated by this package and use it to validate OTP's for your users, the same way you use google2fa you can use this package.
- Since we can generate the OTP's for any model you want, you can send the OTP generated by SMS or Email to your users. and they can use it to validate their accounts.
- This is very handy if you want to use OTP's for your users but you don't want to use the authenticator app. Or give your users the option to use authenticator or receive the OTP in sms.
- Authenticator OTP's expire in half a minute, but the OTP's generated by this package expire in any specified number of minutes, You can have a valid OTP for the last five minutes.
- If you use the authenticator to authenticate the QR code generated by this package, you can use the same QR code to authenticate the OTP's generated by this package.
- If You revcive by Email or Sms, it natuarly takes longer than half a minute to receive the OTP, so you can use the same received code to authenticate the OTP's generated by this package, since it is valid for the specified minutes.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
Usage
Add the trait to your User model(s) or any other model you want to use for OTP's
`
Once the trait is used in the model you can use the following methods ( example below is for User model )
-
Generate New OTP : this will generate a new otp
- Validate OTP : this will validate the otp
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Salah Elabbar
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of egate-otp with dependencies
spatie/laravel-package-tools Version ^1.14.0 || ^1.16
illuminate/contracts Version ^9.0 ||^10.0 ||^11.0 || ^12.0
bacon/bacon-qr-code Version ^2.0 ||^3.0
illuminate/support Version ^8.82 || ^9.0 ||^10.0 ||^11.0 ||^12.0
pragmarx/google2fa Version ^7.0 ||^8.0