How long does it take for a condom allergy to go away? What to do when you have an allergy?

Condoms are a safe way to prevent pregnancy. But there are some cases where users are allergic to condoms. So how long does a condom allergy go away, what to do if allergic to condoms?