First of all how did he find out? I know plenty of couples who know passwords and passcodes to things and that is not an issue. You stated that he “found” out which would sound as if he didn’t have the information before or had it and you changed it and it turned out to be your ex’s name. This is new level stuff. One you have to own up to it. Why do you have your ex as your password or passcode? There’s something to be said in just that. Find that out within you and then you can proceed.
Right off the bat your husband feels betrayed. He feels as if you have been thinking of this other man. In a way the argument can be made to satisfy his thoughts. Now if the password has been your ex and somehow you didn’t think to change it than maybe there is a pass. How long have you been married. First of all most couples are together a year or more before marriage so once you were in a committed relationship why didn’t you change it? How long was your engagement? I am asking to establish timeline on the password or passcode. However most of the time we are asked to update passwords and after entering it for quite some time you do become aware that the password is what you set it to be. My thought is that you apologize. If the shoe was turned you would most likely be upset. So apologize about the issue. Now on the flip side is if you made it after you and your husband have been together and you know that you have some feelings for your old flame than you have some unanswered questions that only you can answer. Your husband is going to want to know why. Your husband is going to feel some type of way. He is going to be upset and wonder even if you were having marital problems why you choose this password instead of something else. Remember passwords and passcodes are to be someting we can remember which draws on the memory which in this case your husband and most people would think this was an intentional move.
Do you both trust each other. If having a passcode or password isn’t something you two do in your marriage what made him go looking for it? It sounds like you both have some things to think about and work through. It’s sad when you go looking for things you will find it. Was the ex as a password the only thing he and you need to discuss. Old flames usually hit at times when you’re the most vulnerable and I know some women who change their passwords to ex and old flames when their husbands get on their nerves just to give them 5 seconds of knowing they were potentially pissing their husbands off. This is some passive aggressive behavior. This is a way to keep an ex linked to you without having to dive too far into your feelings. I know this sounds crazy to some readers but trust me I know a few that do this and have no issues with it until the tables turn. At that point your marriage is going tit for tat than somebody better figure out if they really want to be married or not.