Skip to content

[2116] added multiple login ids#2136

Open
zesu22 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:feature/2116
Open

[2116] added multiple login ids#2136
zesu22 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:feature/2116

Conversation

@zesu22

@zesu22 zesu22 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • Upgraded Thunder React SDK to v0.3.7, resolving previous console errors.
  • Enhanced the flow graph to support multiple login IDs across OTP, password, and biometric authentication factors.
  • Standardized all current login identifiers to process through the username input field.
  • Integrated new SVG icons for the multiple login IDs selection button.
  • Pending: Awaiting finalized login ID designs from the Thunder team.

Summary by CodeRabbit

  • New Features
    • Added support for signing in with multiple login ID options, including UIN/VID, mobile, email, and NRC.
    • Introduced easier switching between login methods during OTP, password, and biometric flows.
    • Added support for email and NRC input handling, with validation for email entries.
    • Reduced the OTP resend wait time for a faster retry experience.

Signed-off-by: Zeeshan Mehboob <zeeshan.mehboob@infosys.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Reworks the declarative esignet YAML flow to support selecting among multiple login ID types (UIN/VID, Mobile, Email, NRC) across OTP, credentials, and biometrics stages, introducing new reusable prompts and a login-ID selector, renaming a biometric field identifier, adjusting a DOB input type, and reducing the OTP resend timer. Also bumps an oidc-ui dependency version.

Changes

Declarative Flow Multi Login-ID Support

Layer / File(s) Summary
Reusable login ID prompts and selector
esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml
Adds Mobile, Email, NRC, and Password prompt anchors with validation, and a login_ids block rendering trigger buttons for each login ID type.
OTP stage rewiring
esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml
Routes password-path ACR selection to a credentials node, embeds the login-ID selector into OTP prompts, expands OTP flow into mobile/email/NRC nodes, reduces resend timer from 180 to 20, and refines OTP input handling before handoff to credentials.
Credentials prompt nodes
esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml
Adds UIN, Mobile, and Email credentials nodes combining login-ID selector, login-ID prompt, and password prompt, routed to basic_cred_auth, with navigation between login-ID types.
Biometrics prompt nodes and field rename
esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml
Adds Mobile/Email/NRC biometric prompt nodes routing to shared prompt_biometric, renames the biometric identifier from biometrics to biometric in prompt and basic_bio_auth executor inputs, and changes basic_kbi_auth DOB input type to PASSWORD_INPUT.

OIDC UI Dependency Update

Layer / File(s) Summary
Dependency version bump
oidc-ui/package.json
Updates @thunderid/react dependency from 0.1.0 to ^0.3.7.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ACRSelection
  participant LoginIdsSelector
  participant OTPPrompt
  participant CredentialsNode
  participant BasicCredAuth

  User->>ACRSelection: choose password/OTP path
  ACRSelection->>LoginIdsSelector: route to login ID selection
  User->>LoginIdsSelector: pick UIN/Mobile/Email/NRC
  LoginIdsSelector->>OTPPrompt: show corresponding OTP prompt
  User->>OTPPrompt: submit OTP
  OTPPrompt->>CredentialsNode: proceed to credentials node
  User->>CredentialsNode: enter password
  CredentialsNode->>BasicCredAuth: submit login ID + password
  BasicCredAuth-->>User: authentication result
Loading

Possibly related PRs

  • mosip/esignet#2043: Also modifies flow-declarative-esignet.yaml ACR selection, OTP/credentials/biometrics routing, and multi-login-ID support in the same authentication flow resource area.

Suggested reviewers: anushasunkada

Poem

A rabbit hops through paths anew,
UIN, Mobile, Email, NRC too 🐇
Login IDs dance in tidy rows,
Biometric names now match the flows,
Timer trimmed, and DOB rehashed —
Hop, hop, hooray, the flow relaunched!

🚥 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 matches the main change: adding support for multiple login IDs across the auth flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@zesu22 zesu22 linked an issue Jul 8, 2026 that may be closed by this pull request

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml`:
- Around line 92-94: The mobile number validation in the declarative flow is too
permissive because the regex is unanchored and allows empty input; update the
regex used in the validation entry under the flow configuration to require at
least one digit and match the full value. Replace the current pattern in the
mobile number rule with an anchored numeric-only expression so the message
“Mobile Number must contain numbers only” is enforced consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 14508f52-8d75-4f25-b5bc-45e084543794

📥 Commits

Reviewing files that changed from the base of the PR and between 31db721 and aef5447.

⛔ Files ignored due to path filters (5)
  • oidc-ui/package-lock.json is excluded by !**/package-lock.json
  • oidc-ui/public/images/email_icon.svg is excluded by !**/*.svg
  • oidc-ui/public/images/mobile_icon.svg is excluded by !**/*.svg
  • oidc-ui/public/images/nrc_id_icon.svg is excluded by !**/*.svg
  • oidc-ui/public/images/vid_icon.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml
  • oidc-ui/package.json

Comment on lines +92 to +94
- type: regex
value: "[0-9]*"
message: Mobile Number must contain numbers only

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant flow config around the reported lines.
sed -n '70,110p' esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml

# Find where regex validators are interpreted to understand the matching semantics.
rg -n "type:\s*regex|message:\s*Mobile Number must contain numbers only|regex" esignet-service -g '*.yaml' -g '*.yml' -g '*.java' -g '*.kt' -g '*.js' -g '*.ts'

Repository: mosip/esignet

Length of output: 3733


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact block with line numbers.
cat -n esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml | sed -n '85,100p'

Repository: mosip/esignet

Length of output: 697


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the implementation that applies "type: regex" validations and inspect its matching semantics.
rg -n "case\s+['\"]?regex['\"]?|type\s*==\s*['\"]regex['\"]|Pattern\.matches|matches\(" esignet-service -g '*.java' -g '*.kt' -g '*.ts' -g '*.js'

Repository: mosip/esignet

Length of output: 151


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for the flow validation model and any regex helper in the repo.
rg -n "validation.*regex|regex.*validation|Pattern\.compile|Pattern\.matches|String\.matches|matches\(" . -g '*.java' -g '*.kt' -g '*.ts' -g '*.js' -g '*.yaml' -g '*.yml'

Repository: mosip/esignet

Length of output: 151


Mobile-number regex should be anchored and require at least one digit at esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml:92-94.

"[0-9]*" accepts empty input and can match non-numeric text; it doesn’t enforce “numbers only.” Use ^[0-9]+$ to make the validation do what the message says.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@esignet-service/data/config/resources/flows/flow-declarative-esignet.yaml`
around lines 92 - 94, The mobile number validation in the declarative flow is
too permissive because the regex is unanchored and allows empty input; update
the regex used in the validation entry under the flow configuration to require
at least one digit and match the full value. Replace the current pattern in the
mobile number rule with an anchored numeric-only expression so the message
“Mobile Number must contain numbers only” is enforced consistently.

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.

eSignet - Thunder UI: Support Multiple Login ID Types in eSignet UI

1 participant