You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
User has become invalid after parse server restarted #258
I confirmed that the user which signed up via cloud code could access all cloud function and objects, even after it logged out and logged in again with renewing its session token.
But after restarting the parse server, all users seem to be invalid.
Though an user can log in the server and get a new session after the server restarted , the server responds "unauthorized" when the user calls any cloud code like "query.find".
(query.find fails in spite of being passed the new session token explicitly)
I cannot restart the server? or need any options?
Of course, this does not occur with Parse.com, although I don't know if Parse.com restarts or not.
Though I forgot to mention which API I used, it was REST API.
Then I checked RestQuery.js.
getUserAndRoleACL() seems only to get role and not to try to get the user.
Is this the right way?
Auth.js seems to get user from cache first. So, I think, my server could retrieve users info and their roles while there were users info in the cache. Then the user could execute cloud code.
But after my server was restarted, there were no longer users info in cache, and RestQuery did not retrieve users info. Then the user could not execute cloud code.
When there are no users in cache, user object is got by executing RestQuery.execute.
getUserAndRoleACL() is called at first but there is no user object in auth at this time. Then roles are not retrieved.
Activity
kosumi commentedon Feb 5, 2016
Though I forgot to mention which API I used, it was REST API.
Then I checked RestQuery.js.
getUserAndRoleACL() seems only to get role and not to try to get the user.
Is this the right way?
Auth.js seems to get user from cache first. So, I think, my server could retrieve users info and their roles while there were users info in the cache. Then the user could execute cloud code.
But after my server was restarted, there were no longer users info in cache, and RestQuery did not retrieve users info. Then the user could not execute cloud code.
gfosco commentedon Feb 5, 2016
getUserAndRoleACL fetches the array of roles, and then pushes the users objectId on to it. That looks correct.
But this does sound like an issue.. will look in to it.
kosumi commentedon Feb 6, 2016
When there are no users in cache, user object is got by executing RestQuery.execute.
getUserAndRoleACL() is called at first but there is no user object in auth at this time. Then roles are not retrieved.
gfosco commentedon Feb 20, 2016
Should be fixed by #374 which will be in 2.1.3, or you can pull the latest master. Please open a new issue if you still have problems. Thanks.