Skip to content

feat(auth): show security warning dialog before account creation#700

Open
Vaishnavi10706 wants to merge 1 commit into
SB2318:mainfrom
Vaishnavi10706:feature/add-signup-security-warning
Open

feat(auth): show security warning dialog before account creation#700
Vaishnavi10706 wants to merge 1 commit into
SB2318:mainfrom
Vaishnavi10706:feature/add-signup-security-warning

Conversation

@Vaishnavi10706
Copy link
Copy Markdown

@Vaishnavi10706 Vaishnavi10706 commented May 15, 2026

Description

Adds a security warning dialog that appears when a user attempts to create
an account. The user must acknowledge the warning before signup proceeds.

Fixes: #688

Changes Made

  • frontend/src/components/SecurityWarningModal.tsx (new file)
    A reusable modal component following the existing EmailVerifiedModal
    pattern. Displays the security warning title, message, and two action
    buttons Cancel and Continue.

  • frontend/src/screens/auth/SignUpScreenFirst.tsx (modified)
    Intercepts the submit action for both General User and Doctor flows.
    Shows the security warning modal before any registration logic runs.

  • frontend/src/screens/auth/SignUpScreenSecond.tsx (modified)
    Intercepts the submit action for the Doctor registration flow.
    Shows the security warning modal before calling the register API.

Behavior

  1. User fills in the signup form and taps Register / Continue
  2. Validation runs as before (no change)
  3. Security Warning modal appears with the message:

    "Do not create an account using the same password as your Google,
    Facebook, or any other authentication account. Please use a unique
    and strong password for this platform. Please do not share your
    password with anyone else."

  4. Cancel dismisses the modal, signup does not proceed
  5. Continue acknowledges the warning, signup proceeds normally

What Was NOT Changed

  • No authentication logic modified
  • No UI/styling changes outside the new modal
  • No new dependencies added
  • No folder structure or unrelated files touched

Type of Change

  • New feature (non-breaking change that adds functionality)

Checklist

  • Code follows the existing project style and patterns
  • Only files necessary for this feature were modified
  • Existing functionality is fully preserved
  • Accessibility labels added to modal buttons

- Add SecurityWarningModal component with title 'Security Warning'
  and message warning users not to reuse passwords from Google,
  Facebook, or other auth accounts
- Intercept handleSubmit in SignUpScreenFirst and SignUpScreenSecond
  to show the warning before registration proceeds
- User must tap 'Continue' to proceed or 'Cancel' to abort signup
- Follows existing RN Modal pattern used by EmailVerifiedModal
@github-actions
Copy link
Copy Markdown
Contributor

Thank you @, for creating the PR and contributing to our UltimateHealth project 💗.
Our team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Copy link
Copy Markdown
Owner

@SB2318 SB2318 left a comment

Choose a reason for hiding this comment

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

Please attach one screenshot. Thanks for your contribution, Welcome to GSSOC'26

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡[Feature]: Add password security warning dialog during account creation

2 participants