Archived
Restore public demo review password
This commit is contained in:
@@ -82,13 +82,15 @@ bun run db:push # fast iteration during development
|
||||
# bun run db:migrate # same migrations the Docker image runs in production
|
||||
```
|
||||
|
||||
**Demo account.** For App Store review and local testing, `bun run db:migrate` creates a pre-populated but locked `demo@example.com` account (`db:push` does not). Provision a private, temporary password when review access is needed:
|
||||
**Demo account.** For App Store review and local testing, `bun run db:migrate` creates a pre-populated `demo@example.com` account (`db:push` does not) with the public password `demo123`.
|
||||
|
||||
To rotate the credential temporarily, provision a private password:
|
||||
|
||||
```bash
|
||||
DEMO_ACCOUNT_PASSWORD='<private 12+ character password>' bun run demo:provision
|
||||
```
|
||||
|
||||
Provisioning rotates the credential and invalidates prior sessions. Do not commit or publish the password. Re-run the command to rotate it; migration 0027 disables the previously public credential. The account includes a sample business, clients, and invoices (draft, sent, and paid).
|
||||
Provisioning rotates the credential and invalidates prior sessions. Do not commit or publish a private replacement password. The account includes a sample business, clients, and invoices (draft, sent, and paid).
|
||||
|
||||
### 4. Run
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
-- Restore the public App Store review credential for the seeded demo account.
|
||||
-- Password: demo123
|
||||
UPDATE "beenvoice_user"
|
||||
SET "password" = '$2b$12$90U31okgkhOwSQD5RDqHwO0QpcC.pkKsqKb1IPnHfKUZm/2A9hzs6',
|
||||
"updatedAt" = NOW()
|
||||
WHERE "id" = 'a0000000-0000-4000-8000-000000000001'
|
||||
AND "email" = 'demo@example.com';
|
||||
|
||||
UPDATE "beenvoice_account"
|
||||
SET "password" = '$2b$12$90U31okgkhOwSQD5RDqHwO0QpcC.pkKsqKb1IPnHfKUZm/2A9hzs6',
|
||||
"updatedAt" = NOW()
|
||||
WHERE "userId" = 'a0000000-0000-4000-8000-000000000001'
|
||||
AND "providerId" = 'credential';
|
||||
|
||||
DELETE FROM "beenvoice_session"
|
||||
WHERE "userId" = 'a0000000-0000-4000-8000-000000000001';
|
||||
@@ -197,6 +197,13 @@
|
||||
"when": 1786740000000,
|
||||
"tag": "0027_disable_public_demo_password",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 28,
|
||||
"version": "7",
|
||||
"when": 1786766968000,
|
||||
"tag": "0028_enable_public_demo_password",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user