TestFlight - lock ipad

Hello,

I login to TestFlight with someone's apple id and pw but after that, that person locked my ipad and factory reset remotely.

Luckly he unlock my ipad and all good now.

How can I prevent this in the future if I use someone's testflight?

Thank you

TestFlight - lock ipad
 
 
Q