twilio_phone_verification 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/lib/twilio_phone_verification/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5254f607a9b3c1076ed6611c9f09ec77e01a3808
|
4
|
+
data.tar.gz: b7d49e8d2aec5856bd3ef63d5d5f8d318b5ae208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543814eb4b99ce88635dc75e865419efb6d87bf814548e6bb85db62470fe7933d05a0b0f87ebc5fdcbbc5bbb7b01d750d4d791987a9702a343e29ee3c07759c8
|
7
|
+
data.tar.gz: 23b26bb9ae7471090e2893272a27eaf717dfb84706d29bf5dfb1ebb725fb7ced7d9c40e0f8286bdbe159b9abdda771d95fde4cc359fd568c6abc25257c5c29b1
|
data/README.md
CHANGED
@@ -47,6 +47,19 @@ After this you will need to add concern to your `model`
|
|
47
47
|
```ruby
|
48
48
|
class User < ActiveRecord::Base
|
49
49
|
include TwilioPhoneVerification::Phonable
|
50
|
+
|
51
|
+
# There are defaults values and you can customize them
|
52
|
+
def phone_confirmation_delay
|
53
|
+
1.minute # delay between each sms message
|
54
|
+
end
|
55
|
+
|
56
|
+
def get_phone_confirmation_token
|
57
|
+
(0..9).to_a.sample(6) # confirmation token
|
58
|
+
end
|
59
|
+
|
60
|
+
def phone_confirmation_message
|
61
|
+
"Hello, #{name}. Your verification code: #{phone_confirmation_token}" # sms message which we send to user
|
62
|
+
end
|
50
63
|
end
|
51
64
|
```
|
52
65
|
|