How iamrudhh/python-login-signup works
This is a small terminal-based authentication program. A user selects an action from the menu; signup validates a username, password, and mobile number before hashing the password and adding the account to memory, while login looks up an account and checks its password. The program can read an existing users.json file at startup, but the sampled source never writes account changes to disk. Also, signup stores a SHA-256 hash while login compares it directly with the entered password, so that check will not succeed for newly registered accounts. The README’s persistence claim is not supported by the source shown.
Main entry points: main.py Main menu
Components 9
Terminal interaction
- Main menu
main.py
Account operations
- Signup
main.py - Input validation
main.py - Login
main.py - Show database
main.py
Credential data
- SHA-256 hashing
main.py - In-memory database
main.py - users.json
Other components
- Terminal user
Connections 11
- Terminal user → Main menu: chooses action
- Main menu → Signup: dispatches
- Main menu → Login: dispatches
- Main menu → Show database: dispatches
- Signup → Input validation: checks inputs
- Signup → SHA-256 hashing: hashes password
- Signup → In-memory database: adds account
- Login → In-memory database: looks up account
- Login → Terminal user: prompts and reports
- Show database → In-memory database: prints contents
- users.json → In-memory database: loads at startup