I have an offline first application build using AngularJS(and service worker). I am taking advantage of IndexedDB to keep my data when the application is used offline(without internet connection). My application interacts with DHIS APIs to sync data when the internet connection is available. Now I want to use OAuth provided by DHIS to authenticate my users. Also, I want to provide offline functionality so that users should be able to use my application without internet connection.
- I want to know is OAuth suitable for offline-first applications.
- How to authenticate users when they don't have internet connectivity.