I'm coding a mobile application with Ionic Framework and the OktaAuth.js tool. The application would have a local database that would be synchronized with a shared hosting backend from time to time. I'm pretty new to authentication things, which was the reason I chose Okta as an authentication service. Now I've got a problem with remembering the user of each mobile device, i.e. not requiring them to enter their credentials and sign in every time.
An active login would be required when synchronizing the local application with the remote database, and when sharing content in social media, but otherwise the application could be used even without an Internet connection.
How would I implement this kind of authentication system with Okta?