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
Verifier package lets you verify emails & phone numbers, with customization available at different components. There's a functional (if provided with valid configurations) sample app provided [here](https://github.com/bnkamalesh/verifier/blob/master/cmd/main.go).
7
+
Verifier package lets you verify emails & phone numbers, with customization available at different components. There's a functional (if provided with valid configurations) sample app provided [here](https://github.com/naughtygopher/verifier/blob/master/cmd/main.go).
13
8
14
9
## How does it work?
15
10
16
-
Verifier generates secrets with an expiry, appropriate for emails & mobile phones. In case of emails,
11
+
Verifier generates secrets with an expiry, appropriate for emails & mobile phones. In case of emails,
17
12
it generates a 256 character long random alpha-numeric string, and a 6 character long numeric string
18
13
for mobile phones.
19
14
@@ -24,7 +19,7 @@ By default, it uses [AWS SES](https://aws.amazon.com/ses/) for sending e-mails &
24
19
You can customize the following components of verifier.
25
20
26
21
```golang
27
-
22
+
28
23
// Customize the default templates
29
24
// there should be 2 string placeholders for email body. First is the 'callback URL' and 2nd is the expiry
30
25
verifier.DefaultEmailOTPPayload = ``
@@ -37,7 +32,7 @@ You can customize the following components of verifier.
37
32
log.Println(err)
38
33
return
39
34
}
40
-
35
+
41
36
// Service provider for sending emails
42
37
err:= v.CustomEmailHandler(email)
43
38
if err != nil {
@@ -53,7 +48,7 @@ You can customize the following components of verifier.
53
48
return err
54
49
}
55
50
// ==
56
-
51
+
57
52
// Persistent store used by verifier for storing secrets and all the requests
58
53
err = v.CustomStore(verStore)
59
54
if err != nil {
@@ -91,8 +86,9 @@ You can customize the following components of verifier.
91
86
```
92
87
93
88
## TODO
89
+
94
90
1. Unit tests
95
-
3. Setup a web service, which can be independently run, and consumed via APIs
91
+
2. Setup a web service, which can be independently run, and consumed via APIs
0 commit comments