The Iran Nuclear Deal and the Paris Accords were not treaties. We have a process to ratify treaties in the US. The president approves a treaty and sends it to the senate to approve or reject.
It's easy for president to make executive order agreements because it doesn't require approval from the senate (something Obama knew he couldn't get for either deal). But all parties should know that these non-treaties can be undone without a second thought by a new president.
The nice thing about the American system is that while treaties are difficult to pass, they are more or less permanent.