Rotate Credentials (local SQLite user)
To update a user's password in the local SQLite DB (recommended: run locally, do not share passwords):
- Open PowerShell in the project folder:
cd "d:\WebDev\DigitalAssetMgrPro\stitch_digital_asset_manager_pro"
- Run the
add_user.pyscript; it will create or update the user and securely hash the password.
Interactive (recommended):
python add_user.py --email you@example.com
# then enter the new password when prompted
Scripted:
python add_user.py --email you@example.com --password "NewStrongPassword123!"
- Verify login via the sign-in page:
Open: http://127.0.0.1:8000/sign_in.html
Or test the API directly (PowerShell):
(Invoke-WebRequest -Method POST -Uri http://127.0.0.1:8000/api/login -Body (@{email='you@example.com';password='NewStrongPassword123!'} | ConvertTo-Json) -ContentType 'application/json' -UseBasicParsing).Content
Security notes: - Do not commit passwords to source control or paste them into public chat. - Rotate credentials if they are accidentally exposed. - For production, use a proper secrets manager and enforce HTTPS + multi-factor auth.