0
votes

We have migrated our production app from hosted Parse to Parse Server and when during testing we have encountered that our cloud functions are not working properly. After research we have found that session for our authenticated users is not saved to Session class on database by Parse SDK automatically. When we signup new user, session is created and it is saved to cloud. We can see it from Parse Server dashboard. But when we sign out that user and sign in again, especially after sign in, session is created but it is not saved to cloud and we cant see it from dashboard. It seems like it remains on local. Thats why our cloud code is not running, because request.user on all cloud functions is null and user is not authorized. We are using latest Parse Server with version 2.2.14 and revocable sessions.

1
Where is your code?Tom Lord
On AWS. We are using Amazon Web ServicesMukhammad-Aziz Ravshanbekov

1 Answers

0
votes

Did you add this to your code (from the Session Migration Tutorial)

In your app's code, add this line just after the Parse initialization line where you set your application ID and client key. This line will cause all login/signups from the SDK to use revocable sessions. It will also issue a network call to Parse in the background to upgrade your user's legacy session token to the new revocable token.

iOS: [PFUser enableRevocableSessionInBackground]

Android: ParseUser.enableRevocableSessionInBackground()

.NET: ParseUser.EnableRevocableSessionAsync()

JavaScript: Parse.User.enableRevocableSession()