-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Parse OS X Client and Cloud Code Disagree About User Being Logged In #609
Comments
Hey @iosdev-republicofapps, this would happen on the server, if your client session token was revoked (if you have revokable sessions enabled).
One note about revokable session tokens - they don't expire in a reasonable amount of time (they do after 1 year of inactivity). I would double check your logic on logging in/signing up. |
Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.
|
@nlutsenko - I don't use revocable sessions. All of "Require revocable sessions, Expire inactive sessions after 1 year and Revoke existing session tokens when user changes password" are all set to No. I haven't revoked any sessions. I wouldn't even know how to revoke a session. I don't have any special logic for logging in or signing up. I just follow the examples you give in your tutorials. I'm only using your Parse functions for login and signup. Nothing special. I am definitely not messing with the sessions on either the client or server end. I have seen this issue before with other versions of your SDK. Any idea what could be going on? Would doing a clean build in Xcode possibly cause this? Or blowing away the derived data dir for Xcode? I have done clean builds but haven't messed with derived data. |
This might be related to issues with Keychain storage. Let me know how it goes for you. |
Ow... Also, since it's a OS X app - could you make sure that you have access to keychain from that app? (denying access would void storage of session token for the user). |
@nlutsenko I did have a sessionToken in my debug window but it got cleared out when I rebuilt. Any way to recover that? Also, is there a programmatic way to ensure keychain access for an OS X app, or do you mean I should allow the keychain access if the OS prompts me for it the first time Parse tries to use the keychain? I don't recall seeing that dialog asking for keychain access, but I would not have said no to the dialog if it did ask for permission. |
The item that we store content should look like this:
|
@iosdev-republicofapps If you can't seem to figure it out - could you share your app with me? I might be able to help you if i see the code closely. Running our sample app and agreeing to the keychain prompt seems to work great for me. |
Checked all this. The parse keychain element is there. Any other ideas? |
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
Not quite at this point, no. If you add the small project where you can reproduce the issue here, I might be able to help you further, but at this point - the only thing that comes to my mind is wrong entitlements specified on the application. |
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
We are closing this issue due to another 7 days of inactivity. If you have additional information to help pinpoint this issue as an SDK bug, please reopen it with the additional information.Thank you for your feedback. |
I am experiencing the exact same problem in an iOS application. Same circumstances:
Since you mention the keychain, could this start happening to a user after restoring a device backup from iCloud or iTunes on a different device? I'll need to dig a little more into the iOS keychain docs to know for sure, but I believe that when restoring to a different device, keychain data is not preserved. Will keep you posted. |
@bourquep, please do. I am very interested in what you find. |
I'm experiencing the exact same issue. Has anyone been able to find a solution for this? |
My request.user is null in my aftersave hook in my cloud code. The strangest part is, in the same aftersave hook, in a different conditional, the request.user works fine. Something is broken. Hate to see these threads continuously closed. |
Hi,
I have code that checks the user locally in my OS X client before making a cloud code call and:
So from the client code's perspective, the user is clearly known, authenticated and logged in.
However, when I call the
rateTheme
method from the client code, the cloud code on the server claims the request has no user:So why does the server cloud code think the user is not logged in when the client code does think it is logged in? This is 100% reproducible. I haven't used my app for some time, so is it possible that the client user session "expired" somehow and just didn't realize it?
From lldb:
I also did a clean build and re-ran and then this happened, in Xcode debug build. Any chance something odd is happening there?
This seems like a Parse bug. I have no way of verifying if the user is logged in locally if I can't trust the client and server to agree if the user is logged in.
Also, trying to save the user (by adding a theme to the user's list of themes, stored on the user) returns an error, error
Any ideas?
Thanks!
The text was updated successfully, but these errors were encountered: