Mayonnaise has a reputation for spoiling quickly. But most people have no problem keeping a jar of store-bought mayonnaise for months. I bet they wouldn’t try that with an open can of tuna or a hard-boiled egg.
The acid of the lemon juice or vinegar keeps homemade mayonnaise from spoiling. I store mine in a plastic container in the refrigerator, usually for several weeks. If the oil separates from the egg you can mix them up again—this doesn’t mean the mayonnaise has spoiled. If you are not sure whether the mayonnaise is okay, leave it for another day or two. Then you will know for sure by the smell. Spoiled mayonnaise develops visible mold or mildew.