[FREE] 🔒 Auth Extension- Check if Passcode lock is enabled on a device


Spent a while creating this code snippet.
So what it does
When button is clicked it checks if the device has a passcode lock

If passcode is enabled

The app asks for the device credentials. Now the most important question, what happens if the user clicks the back button or the recent apps button. The activity fails and the activity is called again. kind of like a loop. So the user won't be able to login until the password is entered.
When the password is entered correctly the block in the after activity is executed and the label is changed to success. You can change it and execute any other block obviously

If passcode is disabled

If passcode is disabled then the notifier will show an alert that Lock Disabled

@TIMAI2 I didn't implement that in the extension as it was possible to do it via blocks instead
Please post your feedback on this