This repository contains a simple static web page that interacts with a FastAPI backend to demonstrate user authentication functionalities. The page allows users to create contracts, register, login, retrieve user information, and delete contracts.
- Create Contract: Allows creating a new contract by specifying an application name. A unique contract key is generated for each contract.
- Register: Enables users to register by providing a contract key, username, first name, last name, and password.
- Login: Allows users to log in using their username, password, and application name.
- Get User Info: Retrieves a list of all registered users under a specified contract key.
- Delete Contract: Deletes a specified contract and all associated users.
- HTML
- CSS
- JavaScript
- Web browser (e.g., Google Chrome, Mozilla Firefox)
- Go to the "Create Contract" section.
- Enter the application name.
- Click on "Create Contract".
- The result, including the contract key, will be displayed below the form.
- Go to the "Register" section.
- Enter the contract key, username, first name, last name, and password.
- Click on "Register".
- The registration result will be displayed below the form.
- Go to the "Login" section.
- Enter the application name, username, and password.
- Click on "Login".
- The login result, including the access token and refresh token, will be displayed below the form.
- Go to the "User Info" section.
- Enter the contract key.
- Click on "Get All Users".
- The list of all users under the specified contract will be displayed below the form.
- Go to the "Delete Contract" section.
- Enter the contract key.
- Click on "Delete Contract".
- The result of the deletion will be displayed below the form.
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or find any bugs.