Unfortunately there is no way out but to go to town. For those who aren't entirely aware of the the way these unfold, here is a simple version:
- A goblin's death spawns a pure gold portal
- Entering the portal takes you to the goblin rift(*)
- The rift is very short (contains no timer or progress) and is filled mostly with jars that contain millions of gold when broken.
- Inside of the rift there are a series of the doors, and after moving through the rift there is the final door to the vault called "The Inner Sanctum"
- Once this door is entered then you encounter the boss, "Greed"
So here is the thing, once the inner sanctum has been entered, and Greed defeated, there is no way out. You cannot go back, and there are no portal options to click on. The only option is to use a town portal, or to use the map to port to a waypoint or city.
However, you can still enter the goblin rift from the golden portal spawned by the goblin, this never closes. All you need to do is run back (which may take some time depending on its location).
Heck, at least you made it in :)
(*) Technically, this is the "Treasure Realm" and the boss "Greed" is in "The Inner Sanctum", but everyone tends to refer to the encounter as a whole as the goblin rift. It is not an actual rift.