Former Labour leader Jeremy Corbyn was also among those who backed legislation seen by many as a crucial step to reversing Brexit.