In order to protect the users’ data, Samsung & Google had introduced Factory Reset Protection in Android Lollipop and above versions. Once the phone is factory restored from Recovery or Hard Reset Combination, user is forced to enter the previously used Google account on the device, in order to ensure that the device is in safe hands or to whom it originally belongs.
If you have hard reset your device from Settings, FRP lock might not be enforced. If your Samsung Galaxy S6, Note 5, S7, S7 Edge or Galaxy S8, Galaxy S8 Plus, Note 8 are locked with FRP (Factory Reset Protection). Here is the universal method to unlock FRP lock and credit for this method goes to RootJunky.