Car lights left on auto. Dead battery? - 1

So I have a 2009 Nissan Altima and I left the lights on auto. It usually takes about five minutes for them to shut off. The next morning when I tried to start my car it wouldn't start. This is the first time I left my car lights on auto and the first time it has died. I also left a cord plugged in. I believe it's called an auxiliary cord to play music off my iPhone. It does not charge my phone or anything like that. The car was turned off. Which one of these were the problem?

The lights being on 5 minutes won't drain a battery, and with the ignition off, there's no power going to that thing you had plugged in, so you have some sort of 3rd issue which could be a parasitic drain or faulty battery/charging system

Go to nissan and have them check it out/ do a starting/charging system test

Could be both, i left my cord in for my gps and it drained my battery, took a few days though

Probably neither. Auto lights should turn off quickly enough to not drain the battery and the auxiliary cable for your iPhone probably loses power when you turn off the car. Double check that you didn't leave any lights on in the interior or that you didn't have the lights on "On" when you thought it was on "Auto".

If you are certain there was nothing on that shouldn't have been, you might just need a new battery.

It definitely wouldn't be the auxiliary cord, so it must have been the lights. I've noticed that when I leave my lights on auto, they normally shut off after I lock the car. Could that be part of what happened? Maybe you normally lock your car, but didn't this time, so the lights never shut off and that drained the battery? Or maybe the auto normally shuts your lights off either way. I'm not sure how your car works. However, I would certainly check to make sure the auto setting is working correctly so that if that was the issue, it can be prevented in the future by shutting your lights off.