Skip to content

logout and getCurrentUserFromServer give unexpected results #62

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

Closed
eslamira opened this issue Jan 29, 2019 · 6 comments
Closed

logout and getCurrentUserFromServer give unexpected results #62

eslamira opened this issue Jan 29, 2019 · 6 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@eslamira
Copy link

eslamira commented Jan 29, 2019

Pubspec :

parse_server_sdk:
    git:
      url: https://github.com/phillwiggins/flutter_parse_sdk.git
      ref: develop

var user = await ParseUser("eslamira", "eslamirapassword", null).login();

// Success login

and :

await ParseUser.currentUser();

returns

{"className":"_User","objectId":"UdMqp45eTs","createdAt":"2019-01-27T16:05:46.340Z","updatedAt":"2019-01-29T15:15:43.276Z","username":"""eslamira""","password":"""eslamirapassword""","services":null,"ACL":{"*":{"read":true},"UdMqp45eTs":{"read":true,"write":true}},"sessionToken":"""r:9c44da87b21d666881886b6a4794c039"""}

then i try

var user = await (await ParseUser.currentUser).logout();

and :

await ParseUser.currentUser();

returns the same object

{"className":"_User","objectId":"UdMqp45eTs","createdAt":"2019-01-27T16:05:46.340Z","updatedAt":"2019-01-29T15:15:43.276Z","username":"""eslamira""","password":"""eslamirapassword""","services":null,"ACL":{"*":{"read":true},"UdMqp45eTs":{"read":true,"write":true}},"sessionToken":"""r:9c44da87b21d666881886b6a4794c039"""}

so ? he didn't logout ?!

@eslamira
Copy link
Author

eslamira commented Jan 29, 2019

Also :

var x = await ParseClient().currentUser;
print(x); // return correct user object
var y = await x.getCurrentUserFromServer(); // InvalidSessionToken

I/flutter (20174): ----
I/flutter (20174): API Response (_User : ParseApiRQ.currentUser) :
I/flutter (20174): Status Code: 209
I/flutter (20174): Type: InvalidSessionToken
I/flutter (20174): Error: Invalid session token
I/flutter (20174): ----

@eslamira eslamira changed the title logout isn't working ?! logout and getCurrentUserFromServer give unexpected results Jan 29, 2019
@pcg92
Copy link
Contributor

pcg92 commented Jan 29, 2019

Can you try it in the master branch please? Is the same or its working?

@eslamira
Copy link
Author

i think the problem that you don't clear cache of ParseUser().currentUser ,,
tired on 1.0.7 and 1.0.10 no logout and master/develop too ,,

and getCurrentUserfromServer ,, is working on 1.0.7 ,1.0.10 and master and no luck with develop

for reference working on master : flutter_parse_sdk-62dbcc0ce305804d2adc5652e847dce7ceeb76fd

@phillwiggins
Copy link
Member

Will look at now.

@phillwiggins
Copy link
Member

getCurrentUserFromServer is fixed on develop. Still looking into logout issues. Could be related.

@phillwiggins phillwiggins added the type:bug Impaired feature or lacking behavior that is likely assumed label Jan 31, 2019
@phillwiggins
Copy link
Member

Fixed in v1.0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

3 participants