Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-registration validation for IA email and username #9223

Conversation

rebecca-shoptaw
Copy link
Collaborator

@rebecca-shoptaw rebecca-shoptaw commented May 6, 2024

Closes #7080.

Fix. Adds checks for any existing Internet Archive account with the selected email or username before submission of registration form. This will notify users real time if the username they select is already taken, so that they can choose a new username rather than being auto-assigned one with random digits appended.

Technical

Because of the scope of #2055 , I've limited this PR to only adding real-time validation for the fields, not preventing submission with a taken username. This means that if a user elects to ignore the "username taken" error message and submits anyway, the account creation will go through and random digits will be appended to their chosen username.

Submission prevention for this and other failing backend checks (i.e. taken OL email address) will be added as a part of #9205.

Testing

  1. Log out (if logged in)
  2. Hit "Sign Up" or go to /account/create
  3. Enter an email address for which an IA account but no OL account exists (i.e. rebecca@rebeccashoptaw.dev)
  4. An error message should appear (on tab out/de-select) with the warning "An Internet Archive account already exists with this email"
  5. Enter a username for which an IA account but no OL account exists (i.e. rstesting)
  6. An error message should appear (on tab out/de-select) with the warning "An Internet Archive account already exists with this username"

Screenshot

Realtime errors for IA checks

Stakeholders

@mekarpeles @seabelis @cdrini

@rebecca-shoptaw rebecca-shoptaw marked this pull request as draft May 6, 2024 14:29
@cdrini cdrini added the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label May 8, 2024
@rebecca-shoptaw rebecca-shoptaw force-pushed the 7080/fix/validate-ia-login-info-presubmit branch from 1ce2c64 to b9d3827 Compare May 8, 2024 20:16
@rebecca-shoptaw rebecca-shoptaw marked this pull request as ready for review May 8, 2024 20:29
@rebecca-shoptaw rebecca-shoptaw added the Needs: Review This issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed] label May 9, 2024
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Lgtm! Tested on testing.openlibrary.org the errors appear at the right time and in the right cases. Didn't test creating an account since this doesn't actually block submitting.

@cdrini cdrini merged commit c0837bf into internetarchive:master May 13, 2024
4 checks passed
@rebecca-shoptaw rebecca-shoptaw removed the Needs: Review This issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed] label May 13, 2024
@cdrini cdrini self-assigned this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add real-time validation for emails/screennames taken on IA to prevent random digit appending
2 participants