I’m new to couchbase in general but debugging a current iOS app that connects to couchbase.
About the app:
- App doesn’t use Couchbase lite
- Calls REST APIs (python cb SDK) which are the ones checking for a valid session before getting data from the server.
- No TTL is being set when the user session is created which according to this documentation sets the session to a 24hrs default.
- REST APIs check whether or not the session is expired by checking the cookie at db_name/_session
- if the session is expired, the API returns a 401 to the iOS app which then asks the user to log back in.
- We do not want to ask user’s to log back in every day. Essentially, we would like a stateless connection.
A possible solution would be to send a custom TTL time but how big can that number be (seconds)? Or what is the best practice to implement a stateless connection to the coachbase server?