Also found this bug, where we were setting the min passcode length to 6, but the min length for a connected app is 4. This can cause problems when the app is force closed or the shared pref is removed.