Looking for a recommendation on how to implement user login (Simple Authentication) in a iOS app. They way I have it right now is anytime a user successfully logins I set
UserDefaults.standard.set( **true** , forKey: "isLoggedIn") and if the users relaunches the app in any subsequent time a ViewController checks the isLoggedIn flag, if true it bypasses the LoginViewController otherwise the users must login to proceed. The issue I’m running with this approach is if the user does not use the app for some time the token expires and user is unable to interact with the particle device. What is the right way to implement user login in na iOS app? Should I save the username/password to keychain and use that to re-login the user every time in the background?
@Raimis hope you can provide some insight on this. Thanks!