Skip to content

GET /parse/users/me doesn't return token #624

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
thibauddavid opened this issue Feb 24, 2016 · 4 comments
Closed

GET /parse/users/me doesn't return token #624

thibauddavid opened this issue Feb 24, 2016 · 4 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@thibauddavid
Copy link

Hi,

I am logging in an user with parse-server, then returning user.getSessionToken() to my client.
When using PFUser becomeInBackground providing token got from server, user successfully login, but [PFUser currentUser].sessionToken is null.

Could it be because of GET /parse/users/me doesn't return a sessionToken along with user ?
As seen with VERBOSE=1:

GET /parse/users/me { host: '...',
  accept: '*/*',
  'x-parse-session-token': 'r:27b08dbdcf8....',
  ...}
response: <A Parse user, without sessionToken, is this normal ?>

If that's normal, why my PFUser doesn't have sessionToken, which implies that it's not really logged (further request are sent without sessionToken) ?

Thanks

@nlutsenko nlutsenko self-assigned this Feb 24, 2016
@nlutsenko nlutsenko added the type:bug Impaired feature or lacking behavior that is likely assumed label Feb 24, 2016
@nlutsenko
Copy link
Contributor

Yup, looks like a valid bug, we indeed don't send the session token back on /users/me, but we should to maintain compatibility with Parse.com and support all SDKs.
Fix is incoming.

@thibauddavid
Copy link
Author

Thanks @nlutsenko !

Why is it linked to compatibility with Parse.com ? It just prevents becomeInbackground to work correctly, doesn't it ?

@nlutsenko
Copy link
Contributor

SDKs expect certain things from Parse, and we are using Parse.com as a reference for things that exist in both locations (this might not be true in the future), so if Parse.com sends a token back on /login - this is what the SDKs would expect - meaning that we should maintain compatibility with both :P

@thibauddavid
Copy link
Author

Confirmed as fixed with #632 , thanks.

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

2 participants