A narcissist and a codependent are often considered to be polar opposite, however both start off as codependent and they have a lot more in common than you would think.
Codependency is a disorder where the person has lost connection to their innate true self, they look outwardly for validation, which means that they are dependent upon another person for validation of their worthiness and lovability. There are also other core symptoms include, shame, denial, poor communication skills, and lack of boundaries.
Codependents and narcissists often both grow up with adverse childhood experiences, with perhaps, child abuse, trauma, domestic violence, a toxic environment or abusive parents. When a child grows up in a dysfunctional family they develop different ways of coping with anxiety, abandonment, and insecurity. Internalized shame can cause the child to seek love and approval from others, (the codependent), or to seek recognition, control and dominance over others, (the narcissist). The codependent and the narcissist just choose different ways of adapting and responding to their childhood adversities.
A codependent often will deny their own feelings and their own needs, and a narcissist will actually do the same. The codependent "fawns' and acquiesces to others, where as the narcissist uses bullying and anger as a way to project their unmet needs on to others, and as a defense to their underlying issue of lack of self worth and not feeling "good enough".
It isn't uncommon for a narcissist and a codependent to be attracted to one another as the codependent is willing to be hyper focused on their partner, losing themselves in the process and become completely selfless in order to keep the relationship. On the other hand, the narcissist looks for someone who is willing to provide unconditional (and often unhealthy) affection and admiration towards them, and someone who will allow them to be completely selfish in the relationship, hence the codependent and the narcissist end up supplying exactly what the other one needs!