You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is built on top of [ alexeygeno/phone-verification-php ](https://github.com/alexeygeno/phone-verification-php) allows to set this up.
9
7
10
-
Among supported features:
11
-
- Easy(.env) switching between different storages and notification channels
12
-
- Configurable length and expiration time for OTP
8
+
Signing in or signing up on a modern website or mobile app typically follows these steps:
9
+
- A user initiates verification by submitting a phone number
10
+
- The user receives an SMS or a call with a one-time password [(OTP)](https://en.wikipedia.org/wiki/One-time_password)
11
+
- The user completes verification by submitting the [OTP](https://en.wikipedia.org/wiki/One-time_password)
12
+
13
+
This library is built on top of [ alexeygeno/phone-verification-php ](https://github.com/alexeygeno/phone-verification-php) and allows to set this up
14
+
15
+
Supported features:
16
+
- Easy(**.env**) switching between different storages and notification channels
17
+
- Configurable length and expiration time for [OTP](https://en.wikipedia.org/wiki/One-time_password)
13
18
- Configurable rate limits
14
19
- Localization
15
-
-Logging notifications instead of sending the real ones. Useful for non-production environments
16
-
-Usage with different Laravel approaches: [ Automatic injection ](https://laravel.com/docs/10.x/container#automatic-injection), [ facade ](https://laravel.com/docs/10.x/facades), [ commands ](https://laravel.com/docs/10.x/artisan#writing-commands)
17
-
-Routes out of thebox for the quick start
20
+
-Usage with different Laravel approaches: [automatic injection](https://laravel.com/docs/9.x/container#automatic-injection), [facade](https://laravel.com/docs/9.x/facades), and [commands](https://laravel.com/docs/9.x/artisan#writing-commands)
21
+
-Logging notifications instead of sending real ones, beneficial for non-production environments
22
+
-Out-of-the-box routes for quick start
18
23
19
24
## Requirements
20
-
Laravel 9.x
25
+
[Laravel 9.x](https://laravel.com/docs/9.x)
21
26
22
-
One of the Laravel notification channels: [vonage](https://github.com/laravel/vonage-notification-channel), [twilio](https://github.com/laravel-notification-channels/twilio), [messagebird](https://github.com/laravel-notification-channels/messagebird) and [many more ](https://github.com/laravel-notification-channels?q=&type=all&language=php&sort=)
27
+
One of Laravel notification channels: [vonage](https://github.com/laravel/vonage-notification-channel), [twilio](https://github.com/laravel-notification-channels/twilio), [messagebird](https://github.com/laravel-notification-channels/messagebird) and [many more ](https://github.com/laravel-notification-channels?q=&type=all&language=php&sort=)
23
28
24
-
One of the supported storages: [predis/predis](https://github.com/predis/predis), [jenssegers/laravel-mongodb](https://github.com/jenssegers/laravel-mongodb)
29
+
One of the supported storages: [predis/predis](https://github.com/predis/predis), [jenssegers/laravel-mongodb](https://github.com/jenssegers/laravel-mongodb)
#{"ok":true,"message":"The verification is done!"}
71
72
```
72
-
**Note**: The package routes are available by default. To make them unavailable without redefining the service provider just change the bool key **phone-verification.sender.to_log** in config
73
+
**Note**: The package routes are available by default. To make them unavailable without redefining the service provider, change the bool key **phone-verification.sender.to_log** in the configuration
73
74
74
75
## Different storages and notification channels
75
-
To switch between [available](#Requirements) storages and notifications channels you need only to install the respective package and change .env.
76
+
To switch between [available](#requirements) storages and notifications channels, install the respective package and update the **.env** file
76
77
77
-
For instance if you need **mongodb** as a storage and **twilio** as a notification channel just do this:
78
+
For example, to use **Mongodb** as a storage and **Twilio** as a notification channel:
If what's available is not enough you can redefine the service provider and add a storage (implementing *\AlexGeno\PhoneVerification\Storage\I*) or/and a sender (implementing \AlexGeno\PhoneVerification\Sender\I)
86
-
87
-
88
-
86
+
If the available options are not sufficient, you can redefine the service provider and add a custom storage (implementing **\AlexGeno\PhoneVerification\Storage\I**) or/and a sender (implementing **\AlexGeno\PhoneVerification\Sender\I**)
Copy file name to clipboardExpand all lines: composer.json
+27-9Lines changed: 27 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,21 @@
1
1
{
2
2
"name": "alexgeno/phone-verification-laravel",
3
-
"description":"An extensible and configurable php library to verify a phone",
3
+
"description":"A Laravel library to verify a phone via notification channels. Any notification channel can be used as a sender. Redis(predis) or MongoDb can be used a storage.",
0 commit comments