For example some of the tours using the White Pass railroad at Skagway require passports while others don't. I think the tour which has the train one-way and a bus the other is a passport tour, while the train up and then back down the same way doesn't need a passport.
Yes, we were required to show passports on our excursion to the Yukon. Ours was White Pass RR one way, bus the other, but same would apply no matter how you crossed the border. I believe, but am not sure, that there is an exception for the round-trip train excursion where you do not exit the train at all... but I don't know if those go to the border.