At least in Obama’s case, it could be argued that the administration was consistent. They believed a policy of appeasing Iran would strengthen moderates, and reorient the Middle East, and they were hostile toward traditional U.S. allies in the region — the Arab states and Israel.
In Trump’s case, however, his Iran policy is all over the place. He decided to pull out of the Iran deal, but then short arm the “maximum pressure” campaign, and now wants to offer concessions in exchange for a meeting that would be a diplomatic coup for Iran without doing anything to advance U.S. interests. It’s unclear why Trump wanted to pull out of the deal in the first place if this is how he followed through.
There are multiple possible explanations for this vacillation. One is that Trump has competing impulses on foreign policy — wanting to seem tough, wanting to avoid conflict. The other is that he has advisers pulling him in different directions — hawks, non-interventionists who portray any toughness with Iran as a prelude to war, and those like Mnuchin who are sympathetic to Obama’s policies.