check authEnabled

This commit is contained in:
Yasuhiro Matsumoto
2025-07-26 22:53:22 +09:00
committed by mattn
parent 4372bf2fb0
commit eb86f084da
3 changed files with 10 additions and 5 deletions

View File

@@ -1568,9 +1568,11 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
}
}
// Preform Authentication
if err := conn.Authenticate(authUser, authPass); err != nil {
return nil, err
if conn.AuthEnabled() {
// Preform Authentication
if err := conn.Authenticate(authUser, authPass); err != nil {
return nil, err
}
}
// Register: authenticate