Skip to content

feat: added the recover your evault link when entering wrong PIN. Not…#995

Merged
coodos merged 2 commits into
mainfrom
feat/pin-recovery-option-display
Jun 3, 2026
Merged

feat: added the recover your evault link when entering wrong PIN. Not…#995
coodos merged 2 commits into
mainfrom
feat/pin-recovery-option-display

Conversation

@Sahil2004

@Sahil2004 Sahil2004 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

… based on the attempts.

Description of change

added the recover your evault link when entering wrong PIN. It works for every time you enter wrong pin, irrespective of the number of attempts.

Issue Number

Closes #993

Type of change

  • New (a change which implements a new feature)

How the change has been tested

Manually

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • New Features

    • Added "Forgot your pin? Recover your eVault" link on the login page for PIN recovery.
    • Attempts biometric authentication when device support is available.
  • Bug Fixes

    • Avoids unnecessary repeated biometric prompts after initial handling, reducing redundant interruptions.
  • Style

    • Restructured PIN error message into two paragraphs and applied underlined styling to the recovery link.

@Sahil2004 Sahil2004 self-assigned this Jun 3, 2026
@Sahil2004 Sahil2004 requested a review from coodos as a code owner June 3, 2026 12:01
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 19bd5194-b2cc-4019-8db0-eab787fe0aec

📥 Commits

Reviewing files that changed from the base of the PR and between db9e9cb and 29e60c8.

📒 Files selected for processing (1)
  • infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte

📝 Walkthrough

Walkthrough

The login page script is reformatted without changing authentication flow (globalState polling, sessionStorage biometric skip, biometric attempt, PIN validation, and continueAfterSuccessfulAuth). The wrong-PIN alert is restructured into an article and now shows an underlined recovery link to /recover after the first failed PIN.

Changes

Login Page Update with Recovery Option

Layer / File(s) Summary
Authentication script reformatting
infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte
Imports and the page's authentication script are reformatted (multiline styling, trailing commas) while preserving control flow: globalState polling, sessionStorage biometric skip detection, biometric prompting, PIN length gating, PIN verification, and progression to continueAfterSuccessfulAuth.
PIN error UI and recovery link
infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte
The "wrong PIN" message is wrapped in an article with two paragraphs and now includes an underlined "Forgot your pin? Recover your eVault." link to /recover, surfaced after the first failed PIN entry.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • coodos

Poem

🐰 I hopped the login fields tonight,
Cleaned the script and set the light,
When PINs go wrong, a link appears,
To mend the vault and calm your fears,
Recovery waits — no final fright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The change appears to show the recovery link on every wrong PIN attempt, but issue #993 requires it only after the first attempt and hidden initially. Modify code to hide recovery link initially and show it only after the first failed PIN attempt, not on every attempt.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title mentions the main feature of adding a recover eVault link on wrong PIN entry, though it's incomplete/truncated.
Description check ✅ Passed The description includes most required sections: change description, issue number, type of change, testing method, and a complete checklist.
Out of Scope Changes check ✅ Passed Code reformatting and UI restructuring in the PIN error section align with implementing the recovery link feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pin-recovery-option-display

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@infrastructure/eid-wallet/src/routes/`(auth)/login/+page.svelte:
- Around line 57-74: In verifyAndAdvance wrap the await
globalState.securityController.verifyPin(currentPin) call in a try/catch so any
thrown error resets isPostAuthLoading to false (and sets isError = true and
clears pin) before returning; ensure the catch prevents the function from
proceeding to continueAfterSuccessfulAuth and that isPostAuthLoading is always
cleared on both failure and exceptions so the signing-in overlay cannot become
stuck.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5808b39f-94b8-44ce-ae86-5ccd8a5bcf98

📥 Commits

Reviewing files that changed from the base of the PR and between ec3fb2c and db9e9cb.

⛔ Files ignored due to path filters (3)
  • infrastructure/eid-wallet/src-tauri/gen/android/.idea/deploymentTargetSelector.xml is excluded by !**/gen/**
  • infrastructure/eid-wallet/src-tauri/gen/android/.idea/gradle.xml is excluded by !**/gen/**
  • infrastructure/eid-wallet/src-tauri/gen/android/.idea/misc.xml is excluded by !**/gen/**
📒 Files selected for processing (1)
  • infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte

Comment thread infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coodos coodos merged commit 5331d1c into main Jun 3, 2026
1 of 4 checks passed
@coodos coodos deleted the feat/pin-recovery-option-display branch June 3, 2026 12:07
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.

eID Wallet: Show recovery screen option after first wrong PIN entry on login

2 participants