Skip to content
Snippets Groups Projects

Make mongodb auth mechanism configurable.

Closed Cristina Pauna requested to merge feature/make-mongodb-auth-mechanism-configurable into main
5 files
+ 13
11
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 3
2
@@ -63,8 +63,9 @@ func main() {
db, err := mongo.Connect(
context.Background(),
options.Client().ApplyURI(cfg.Mongo.Addr).SetAuth(options.Credential{
Username: cfg.Mongo.User,
Password: cfg.Mongo.Pass,
AuthMechanism: cfg.Mongo.AuthMechanism,
Username: cfg.Mongo.User,
Password: cfg.Mongo.Pass,
}),
)
if err != nil {
Loading