You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Mailauth
2
2
3
-
Mailauth is a Mailbox Manager which enables you too select between your Mailboxes and authenticate with your Mailserver, like [mailcow](https://github.com/mailcow/mailcow-dockerized)
3
+
Mailauth is a Mailbox Manager which enables you too select between your Mailboxes and authenticate with your Mailserver (like [mailcow](https://github.com/mailcow/mailcow-dockerized))
4
4
5
5
## Showcase
6
6
@@ -131,13 +131,17 @@ And set Redirect URI to the one from your `.env` file.
131
131
Next create `init-mongo.js` in your working directory:
132
132
133
133
```js
134
-
// This is only for initializing the db and creating the mailauth user
134
+
const PASSWORD = process.env.MONGO_PW
135
+
const USER = process.env.MONGO_USER
136
+
const DB = process.env.MONGO_INITDB_DATABASE
135
137
136
-
db = db.getSiblingDB("mailauth")
138
+
db = db.getSiblingDB(DB) // Switch to your target database
137
139
db.createUser({
138
-
user: "mailauth",
139
-
pwd: "SECURE_PW", // This should match the one in your env
140
-
roles: [{ role: "readWrite", db: "mailauth" }],
140
+
user: USER,
141
+
pwd: PASSWORD,
142
+
roles: [
143
+
{ role: "readWrite", db: DB }, // Give read/write access to 'mailauth'
0 commit comments