laravel-otp icon indicating copy to clipboard operation
laravel-otp copied to clipboard

OTP generator and validator

Results 15 laravel-otp issues
Sort by recently updated
recently updated
newest added

Hi there @ichtrojan I'd like to know if this package supports Laravel 9? I try to follow the installation step, but the package seems not discoverable. I find a number...

Hello, When I'm trying to generate the OTP using this method `Ichtrojan\Otp\Otp::generate($email, 6, 15);` I'm getting this error Error: Using $this when not in object context in file /vendor/ichtrojan/laravel-otp/src/Otp.php on...

Also replaced `$this->generatePin` with `self::generatePin`

This was the error I got after adding the package to my laravel, **Non-static method Ichtrojan\\Otp\\Otp::generate() cannot be called statically**

Hi. This PR - completely separates concerns (Otp Class, Facades) - Autoloads the Otp facade as well. - also fixing #11 - A Lil documentation, some .gitignore cleanups.

Going through Otp.php in this line https://github.com/ichtrojan/laravel-otp/blob/6ba01e246cbc35322180f3e16d8d7a24ce378363/src/Otp.php#L106, I noticed you are using the mt_rand function. this is not a secure random generator function as seen from the docs here https://www.php.net/manual/en/function.mt-rand.php....

Add static method new for creating instances in Otp class This allows for a more readable, such as `Otp::new()->generate('[email protected]', 'numeric', 6, 15); ` instead of `(new Otp)->generate('[email protected]', 'numeric', 6, 15);`

## Pull Request Description This pull request introduces the following changes: 1. Refactored the hard-coded configuration of validity duration and the length of the token. Now, these configurations are set...

Is there any way to change the default table name from otps to tbl_otps