CouchDB & PouchDB Offline Authentication/Login

We are building an offline application with CouchDB and PouchDB and we need the user to log in to the app before they should be able to view and manipulate data.
The problem is to safely authenticate the user while offline since we dont want to load all the data before the user is succesfully logged in.
Does anyone have any ideas on how to achieve this?

Hello!
Can you explain a little more?
I don’t understand the logic here…

What do you mean by “load all the data”?

Basicly we don’t want the user to be able to enter the application before authentication even in a offline environment. But with the default wappler authentication/login system you have to be connected to the server.
We would like to be able to authenticate the user from anywhere, both online and offline.

But in that case you’ll have to store credentials on a db (inside the app) so everyone will have access to it.
It doesn’t seem very secure at all.

Plus, mobile development is based on html css and js, basically you’ll need to run a kind of flow, but I guess all can be exposed easily.

That is precisely the problem. It is crucial for our application to be able to work offline. Do you have any ideas on how to achieve this?

Can you explain (in a detailed way) the “work”?

In the application you would have to fill in forms about the transport of containers on large ships at sea. So a large part of the time aboard a ship you won’t be able to connect to the internet

You can do it on a mobile app with capacitor.
Store it locally and then you’ll need to create some logic, maybe using a flow on your app.
Something like a sync button:
Call Server connect:
if it has an identity (security provider) then sync.
Else, login

You can also get a device id (using capacitor device plugin) so you’ll have an unique id like a token