I am using ParseServer
on the server side and the Parse iOS SDK on the client side. Here is what currently happens:
userA
logs in (via PFUser.logInWithUsernameInBackground
)_Session
object gets created for userA
(so userA
is now logged in)userB
logs in (via same method, without first calling any 'logout' for userA
)_Session
object for userA
is gone, and there is now a _Session
object for userB
. So userA
has been logged out, userB
has been logged in.What I would like to be able to do is to log-in userA
AND userB
at the same time (from the same device and app). If the first _Session
was not getting automatically deleted, then I would be able to use the sessionToken
(which I can save upon login) to change the PFUser.currentUser
(using PFUser.becomeInBackground
) between userA
and userB
as needed. But I need ParseServer
to not delete the first _Session
.
Any idea how to achieve this? Thanks.
After looking into this and talking to another developer (who had posted about the same issue elsewhere) - it seems like Parse simply won't work properly in the case described above.
The solution we are going for in the end is to save user credentials (using Keychain) and log-in users each time as needed (without the user having to re-type passwords all the time).