To dream of represents a transition, situation, or challenge that you must experience in order to do something else you want. It may also reflect a necessary change, test, or compromise in order to get what you want.
To dream of a secret represents hidden opportunities. Feeling that someone has been keeping something from you or hiding an alternative solution to a problem. New insights that make you realize how naive you’ve been. A possibility that was hidden in plain sight.
Alternatively, a secret may reflect your own attempt to keep a secret, or disguise your true intentions or activities.