Skip to content

Commit

Permalink
feat: make default credentials for auth customizable
Browse files Browse the repository at this point in the history
The current implementation defaults to username: `admin` and password: `zwave` when enabling auth. However, it can also be beneficial to make this customizable so that it can avoid some additional steps in updating these values.This is completely backwards compatible as well.
  • Loading branch information
karmingc committed Sep 18, 2024
1 parent 2557cbc commit 2056321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/config/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export const backupsDir: string =
export const nvmBackupsDir: string = joinPath(backupsDir, 'nvm')
export const storeBackupsDir: string = joinPath(backupsDir, 'store')

export const defaultUser: string = 'admin'
export const defaultPsw: string = 'zwave'
export const defaultUser: string = process.env.DEFAULT_USER || 'admin'
export const defaultPsw: string = process.env.DEFAULT_PASSWORD || 'zwave'
// lgtm [js/hardcoded-credentials]
export const sessionSecret: string =
process.env.SESSION_SECRET || 'DEFAULT_SESSION_SECRET_CHANGE_ME'
Expand Down

0 comments on commit 2056321

Please sign in to comment.