Fixed invalid facebook login sessionToken #173
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to address this todo. Please scrutinize this carefully as I am unsure of it's implications elsewhere.
Although I am able to login with Facebook, when I try to retrieve any data, I get empty results because the session token I am passing to ParseServer is not found in my list of "SessionTokens" and because it is not created as expected. As the TODO specifies, the original version of parse included the correct "createdWith" parameter and passed an installation ID to the "SessionToken" write operation.
Here I store the
createdWith
parameter inthis.data
, and pass along the installation id sent by the user and set inreq.info.installationId
.It also appeared as though the
expiresAt
property was not set, so I also added that.The
expiresAt
key is being written to the database as_expiresAt
. I'm not sure where this is coming from, since it looks like the original Parse implementation wroteexpiresAt
to the database (from looking directly at my mongo data). As a side note, the Parse Dashboard throws an error if the_expiresAt
field is set. I'm not sure of the implications of this either.