Skip to content

Commit

Permalink
Merge pull request #5 from duttarnab/agama-lab-branch
Browse files Browse the repository at this point in the history
Fixes in agama-smtp
  • Loading branch information
duttarnab authored Jan 31, 2024
2 parents 92da088 + 132df3a commit 9f76a5a
Show file tree
Hide file tree
Showing 8 changed files with 1,644 additions and 1,251 deletions.
8 changes: 6 additions & 2 deletions code/org.gluu.agama.smtp.emailVerification.flow
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Flow org.gluu.agama.smtp.emailVerification
// Initialize variables
emailObj = {}
sendMail = true
uiInput = {matches: true, resent: false}
// Get instance email service
emailService = Call org.gluu.agama.smtp.EmailService#getInstance
// Iterate x times max
Repeat 3 times max
max = Repeat 3 times max
// When send mail is allowed
When sendMail is true
// Tun off send mail
Expand All @@ -24,8 +25,11 @@ Repeat 3 times max
// Variable assignment after successful email delivery
emailObj.email = email
emailObj.accountExists = existingAccount
emailObj.matches = uiInput.matches
emailObj.resent = uiInput.resent
// Redirect to page asking for OTP received using email
uiInput = RRF "otp.ftlh" emailObj
uiInput.resent = false
// If user clicked on "resend code" button
When uiInput.resend is ""
// Variable assignment when user clicked on "resend code" button
Expand All @@ -36,7 +40,7 @@ Repeat 3 times max
Finish true
// Variable assigned when OTP entered by user does not matches
uiInput.matches = false
uiInput.resent = false
sendMail = true
// Variable assignment when user exceeds the number of attempts allowed
obj = { success: false, error: "You have exceeded the number of attempts allowed" }
// Finish flow when user exceeds maximum number of flows allowed
Expand Down
Loading

0 comments on commit 9f76a5a

Please sign in to comment.