Skip to content

Fix #2636: Resend OTP fails on the second attempt after an incorrect OTP is entered. - #2639

Open
SajidMannikeri17 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:fix/2636
Open

SajidMannikeri17 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:fix/2636

Conversation

@SajidMannikeri17

@SajidMannikeri17 SajidMannikeri17 commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Clearing inputs now consistently removes them from all active session context.
    • OTP verification flows now retain the resolved username after a successful code delivery, improving continuity in subsequent steps.
    • OTP attempt limits and error handling continue to provide clear retry prompts for client-side errors and stop processing after the configured maximum attempts.

Signed-off-by: SajidMannikeri17 <sajid.mannikeri@infosys.com>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f6517347-4854-4386-9df9-5193968ecc93

📥 Commits

Reviewing files that changed from the base of the PR and between 2394ca3 and bd9931e.

📒 Files selected for processing (2)
  • esignet-service/internal/engine/executors/clear_inputs_executor.go
  • esignet-service/internal/engine/executors/otp_executor.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The executors now maintain RuntimeData during OTP verification and input cleanup. Successful OTP sends store the verified username. Input clearing removes configured inputs from both runtime and user input data.

Changes

Runtime input lifecycle

Layer / File(s) Summary
Cache verified OTP username
esignet-service/internal/engine/executors/otp_executor.go
Successful OTP execution stores the resolved username in RuntimeData.
Clear runtime inputs
esignet-service/internal/engine/executors/clear_inputs_executor.go
Input cleanup deletes each configured input from RuntimeData and updates the debug log message.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: anushasunkada

Merge Risk: ⚪ Minimal · up to bd993

Successful OTP verification retains the username while configured cleanup removes consumed inputs. No concrete merge-blocking failure is established.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing resend OTP behavior after an incorrect OTP attempt.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

OTP finds the name to keep
RuntimeData holds it deep
Cleanup clears the matching trail
Context logs the shorter tale
Two small changes keep flow neat

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

codecov-commenter commented Sep 22, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop-go@2394ca3). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop-go    #2639   +/-   ##
=============================================
  Coverage              ?   70.37%           
=============================================
  Files                 ?      130           
  Lines                 ?     9005           
  Branches              ?      114           
=============================================
  Hits                  ?     6337           
  Misses                ?     2206           
  Partials              ?      462           
Flag Coverage Δ
go 69.20% <100.00%> (?)
npm 92.47% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants