mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
- Move demo user credentials from hardcoded values to environment variables - Add DEMO_USER_EMAIL, DEMO_USER_PASSWORD_HASH, DEMO_USER_NAME, DEMO_USERNAME env vars - Add password hashing utility script for generating secure password hashes - Update docker-compose.yml to properly load .env files and add restart policies - Update .env.example with demo user configuration documentation BREAKING CHANGE: Demo user is now configured via environment variables instead of hardcoded values
23 lines
No EOL
454 B
JavaScript
23 lines
No EOL
454 B
JavaScript
#!/usr/bin/env node
|
|
|
|
const bcrypt = require('bcryptjs')
|
|
|
|
async function main() {
|
|
const password = process.argv[2]
|
|
|
|
if (!password) {
|
|
console.error('Usage: yarn hash-password <password>')
|
|
process.exit(1)
|
|
}
|
|
|
|
try {
|
|
const hash = await bcrypt.hash(password, 10)
|
|
console.log(`Password: ${password}`)
|
|
console.log(`Hash: ${hash}`)
|
|
} catch (error) {
|
|
console.error('Error generating hash:', error)
|
|
process.exit(1)
|
|
}
|
|
}
|
|
|
|
main() |