Skip to content
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

iOs clients are logged out after parse-server migration #3183

Closed
craffenoux opened this issue Dec 5, 2016 · 9 comments
Closed

iOs clients are logged out after parse-server migration #3183

craffenoux opened this issue Dec 5, 2016 · 9 comments

Comments

@craffenoux
Copy link

Hello,

I have successfully finished my migration but it remains a last issue which is the log out my users when they switch to the new iOs client pointing to the new parse-server.

I have the [PFUser enableRevocableSessionInBackground] implemented as follow

[Parse enableLocalDatastore];
[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
    configuration.applicationId = @"****";
    configuration.clientKey = @"****";
    configuration.server = @"****";
}]];
[PFUser enableRevocableSessionInBackground];

Did I miss something ? After the user logged in again, everything is fine.

@craffenoux craffenoux changed the title iOs clients are log out after parse-server migration iOs clients are logged out after parse-server migration Dec 5, 2016
@flovilmart
Copy link
Contributor

Can you run parse-server with VERBOSE=1, more particularly we wanna look at the upgradeToRevocableSession calls and their results.

@craffenoux
Copy link
Author

I did the following steps :

  • Logged in from the old ios client pointing to parse.com
  • Updated to the new ios client pointing to my parse-server
  • Opened the app and NSLog the [PFUser currentUser] and i had a (null) result.

On the serve side I have set VERBOSE=1 in my config vars and i had nothing related to the sessions which has been output. The only thing I can see is Ran cloud function _myFunction_ for user undefined

Are sessions linked to the clientKey ?

@flovilmart
Copy link
Contributor

Are sessions linked to the clientKey ?

No they are not, they are stored per applicationID, Do you have any logs of failing keychain access on your device/simulator?

Have you seen that thread: parse-community/Parse-SDK-iOS-OSX#437 (comment)

@craffenoux
Copy link
Author

craffenoux commented Dec 6, 2016

Ok I've tried something else.

  • I have deleted manually all the session objects for a specific user.
  • Logged in from the old ios client pointing to parse.com
  • Updated to the new ios client pointing to my parse-server
  • Opened the app -> it works!

Do you think it comes from old sessions which are not revocable ?

@flovilmart
Copy link
Contributor

I'm not sure. Tough to say like that.

@craffenoux
Copy link
Author

craffenoux commented Dec 6, 2016

After re-reading all the docs linked to the sessions i have figured out that my parse.com app has been on revocable sessions from day 1.
So it comes from somewhere else.. Any idea where can i look for hints ?

@flovilmart
Copy link
Contributor

Without the device network logs or the server logs that will be tough to say

@alexblack
Copy link

Maybe try logging/catching errors from enableRevocableSessionInBackground

@stale
Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants