I am developing an app which uses Auth0 for authentication with the following requirements:
- Users must be able to log in with their individual accounts on a shared device.
- Any time the app enters a background state (the user navigates to the home screen or a different app, for example) the user must be logged out automatically.
- The user must enter their username and password any time they wish to log in. The user must not be logged in automatically.
- When the device is not connected to the internet, any user who successfully logged in within the last 7 days must be able to log in with their last-used information, after which they must reauthenticate before logging in again.
I am having trouble satisfying requirement #4 using Lock.swift v2. I would prefer to avoid forking Lock.swift if possible.
Essentially, no matter what, Lock must display every time the app is opened - I don’t have a problem with that. What I have been unable to find any information on is how to allow a user to enter a username/password while offline, and validate it manually (as Lock.swift doesn’t appear to contain this functionality).