Skip to content

Commit 010969c

Browse files
Copilothotlong
andcommitted
Address code review: add production warning and fix naming consistency
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 432a154 commit 010969c

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.env.example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ AUTH_SECRET=your-super-secret-key-change-this-in-production
99

1010
# ─── Database Configuration ─────────────────────────────────────────────────
1111

12-
# Optional: Database connection URL (defaults to SQLite: objectos.db)
12+
# Optional: Database connection URL (defaults to SQLite: objectstack.db)
1313
# Examples:
1414
# - PostgreSQL: postgres://user:password@localhost:5432/objectos
1515
# - MongoDB: mongodb://localhost:27017/objectos
16-
# - SQLite: sqlite:objectos.db (or omit for default)
17-
# OBJECTQL_DATABASE_URL=sqlite:objectos.db
16+
# - SQLite: sqlite:objectstack.db (or omit for default)
17+
# OBJECTQL_DATABASE_URL=sqlite:objectstack.db
1818

1919
# ─── OAuth Provider Configuration ───────────────────────────────────────────
2020

@@ -54,8 +54,8 @@ AUTH_SECRET=your-super-secret-key-change-this-in-production
5454

5555
# ─── Two-Factor Authentication ──────────────────────────────────────────────
5656

57-
# Optional: 2FA issuer name (defaults to "ObjectOS")
58-
# BETTER_AUTH_2FA_ISSUER=ObjectOS
57+
# Optional: 2FA issuer name (defaults to "ObjectStack")
58+
# BETTER_AUTH_2FA_ISSUER=ObjectStack
5959

6060
# ─── Server Configuration ───────────────────────────────────────────────────
6161

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ AUTH_SECRET=your-super-secret-key-change-this-in-production
169169

170170
**Optional Configuration:**
171171

172-
- **Database**: Defaults to SQLite (`objectos.db`). Set `OBJECTQL_DATABASE_URL` for PostgreSQL or MongoDB.
172+
- **Database**: Defaults to SQLite (`objectstack.db`). Set `OBJECTQL_DATABASE_URL` for PostgreSQL or MongoDB.
173173
- **OAuth Providers**: Configure `GOOGLE_CLIENT_ID`, `GITHUB_CLIENT_ID`, etc. for social login.
174174
- **Enterprise SSO**: Set up Auth0, Okta, Keycloak, or Azure AD via environment variables.
175175

objectstack.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ export default defineStack({
6767

6868
// Core
6969
new AuthPlugin({
70-
secret: process.env.AUTH_SECRET || 'dev-secret-change-in-production-min-32-chars',
70+
secret: process.env.AUTH_SECRET || (() => {
71+
const defaultSecret = 'dev-secret-change-in-production-min-32-chars';
72+
if (process.env.NODE_ENV === 'production') {
73+
console.error('WARNING: Using default AUTH_SECRET in production! Set AUTH_SECRET environment variable.');
74+
}
75+
return defaultSecret;
76+
})(),
7177
baseUrl: process.env.BETTER_AUTH_URL || 'http://localhost:5320',
7278
}),
7379
new PermissionsPlugin(),

0 commit comments

Comments
 (0)