I would like to implement a short session expiration (lets say one month) for following case:
- User log in on his second device (username+password or apple)
afterLogintrigger checks number of sessions and if > 1 an
multiDevice = trueis set in
multiDevice = truethen the client will open liveQuery also on user’s
Profiledocuments → to sync the changes done on second device to first
multiDevice = truechecked
If the user would lost or stopped using his device the session would get expired and there would be no sync need.
But how can I renew sessionToken without going through the onboarding and login screen again? Do I understand it right that I have to save username+password to keychain and login again in background? For appleID this can’t even be done in background as a need UI view pops up for confirmation.
I see there was some work done on OAuth, but unfortunately got quiet here. Would that help to cover this problematic (both appleID and username+password)?