perhaps do

    if auth[:mechanism] == 'MONGODB-CR' && auth[:password].nil?

to avoid splitting up logic between multiple lines