-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One user one session only? #4705
Comments
The old session is not overwritten but deleted instead, as I find the new session objectId is different. |
Sessions should not be deleted as long as a different installation ID is provided. Can you provide the logs on the server please when running with VERBOSE=1 |
Also, 2.3.x is a year old, you should probably stick to more frequent updates. |
I do not touch any session object by myself and am doubt if the new parse-server does that somewhere. I have just downgraded back to 2.3.8 and the problem is gone now. |
Can you provide the logs when running with VERBOSE=1 please? |
login from chrome: ^[[32minfo^[[39m: Ran cloud function logInForWeb for user undefined with: then login the same user from firefox: ^[[32minfo^[[39m: Ran cloud function logInForWeb for user undefined with: Instead of have 2 _Session objects, there is only the new one and the user is kicked out when I refresh in Chrome. |
You’re logging in inside a cloud function, you need to pass the installationId that made the request (req.installationId) into your login call in the cloud function. |
Thanks! after changing : The problem has been solved. |
@flovilmart Thanks for the tips! But one question, does the installationId passed to the login call have anything to do with the installationId in the |
this is the installationId from the installation class, it serves as an indentifier that ties the sessions to the user. |
I have iOS, Android and Web relying on the same cloud call to return the session token. iOS and Android have the installationId, but there isn't one for the web. I tried hardcoding a random installationId for the web, and it seems working, but I'm not sure if this is the right way to do it. Can you advice? |
I have just updated parse-server to the latest (2.7.4) from 2.3.x and noticed a different behaviour about session. When a user login in multiple devices, instead of creating multiple session objects, session object is being overwritten, and so the user is kicked out in other devices. When is this change introduced and can I revert back to the previous one, where multiple session for the same user is allowed?
The text was updated successfully, but these errors were encountered: