Skip to content

FE: Integrate university registration endpoint with dynamic file generation #51

@onlydustapp

Description

@onlydustapp

Overview

Integrate the university registration endpoint by dynamically generating a unique file name during the Authentication & Security step. The file should combine a random unique ID and the university name, and be used in the verification process.

Background

Currently, the file name used for university verification is static. With this feature update, the file name should be dynamically generated and adhere to the following format:

  • Format: <unique-id>-<university name>.txt
  • Example: cb4b2af445a8a5e0d5b8f6f5d2c-nilestuniversity.txt

When a user clicks verify, a request is sent to the university domain (provided during registration) using the generated file name, e.g., if the university domain is www.nilestuni.edu, the verification URL will be: www.nilestuni.edu/cb4b2af445a8a5e0d5b8f6f5d2c-nilestuniversity.txt.
So if it finds the path, the user is allow to proceed

Requirements

  • Dynamic File Name Generation:
    • Generate a unique identifier and combine it with the university name to form the file name at the Authentication & Security step.
    • The content of the file should exactly match the generated file name (without the file extension).
  • Domain Validation:
    • Ensure that only domains ending with .edu are accepted when processing the registration.
  • Endpoint Integration:

Technical Considerations

  • The unique ID generation should ensure low collision probability (consider using UUID or a similar robust method).
  • Validate the university domain to only allow those ending in .edu.
  • Handle cases where the file or domain might not exist gracefully with proper error messages.

Acceptance Criteria

  1. A unique file name is generated based on a dynamic unique ID and the provided university name.
  2. The file name format should follow <unique-id>-<university name>.txt and the content inside the file should match the file name (without the extension).
  3. Only .edu domains are accepted for verification requests.
  4. A request is properly sent to the university domain using the generated file name when the user clicks verify.
  5. Proper error handling is implemented for missing file or domain mismatches.

Happy coding! 🚀

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions