Nœuds : OTP SMS / Email
Envoi et vérification de codes à usage unique par SMS ou email, dans le cadre d’un graphe d’authentification.
SmsOtpSendNode : génère un OTP numérique et l’envoie par SMS.
| Propriété | Type | Défaut |
|---|---|---|
otpLength | int | 6 |
ttlSeconds | int | 300 |
phoneAttribute | string | telephoneNumber |
phoneSharedStateKey | string | phoneNumber |
smsBodyTemplate | string | Your verification code is: {otp} (valid for {ttl}s) |
Outcomes : sent / error.
Le numéro est lu d’abord dans l’état partagé (clé phoneSharedStateKey, alimentée par PhoneCollectorNode), sinon dans l’attribut phoneAttribute du profil. Il doit être au format E.164 (+33…). L’envoi passe par AWS SNS : voir le tutoriel Double authentification par SMS pour la configuration et un faux SNS de test.
SmsOtpVerifyNode : vérifie l’OTP soumis contre celui envoyé par SmsOtpSendNode.
| Propriété | Type | Défaut |
|---|---|---|
maxAttempts | int | 5 |
Outcomes : true / false / expired.
EmailOtpSendNode : équivalent e-mail de SmsOtpSendNode.
| Propriété | Type | Défaut |
|---|---|---|
otpLength | int | 6 |
ttlSeconds | int | 300 |
emailAttribute | string | mail |
emailSharedStateKey | string | email |
emailSubject | string | Your verification code |
emailBodyTemplate | string | gabarit avec {otp}/{ttl} |
Outcomes : sent / error.
EmailOtpVerifyNode : équivalent e-mail de SmsOtpVerifyNode.
| Propriété | Type | Défaut |
|---|---|---|
maxAttempts | int | 5 |
Outcomes : true / false / expired.
Mis à jour le