You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_linkWith fails to create a session for existing users #5785
that’s the consequence of parse-server not returning a sessionToken, the client app tries to make some requests after linking but fails since linkwith returned no sessionToken
Calling _linkWith on an existing user is like doing object.set('authData', authData) with validation. I think it should be alright to generate a sessionToken in this case.
Activity
dplewis commentedon Jul 9, 2019
Have you tried using MasterKey on _linkWith?
#2348
elios264 commentedon Jul 9, 2019
I'm using the master key
const masterPermissions = { useMasterKey: true };dplewis commentedon Jul 9, 2019
I'm unable to reproduce this. Can you write a failing test here? or Post server logs VERBOSE=1
elios264 commentedon Jul 9, 2019
these are the logs, let my try to create a failing test, the cloud fn is called: authorize-ids-user
elios264 commentedon Jul 9, 2019
How do I config the mongo db uri to enable testing?
davimacedo commentedon Jul 9, 2019
You need to have a mongo running at mongodb://localhost:27017. The test will create/use two databases: parse and parseServerMongoAdapterTestDatabase
dplewis commentedon Jul 10, 2019
@elios264 In your logs I see a permission denied error.
elios264 commentedon Jul 10, 2019
that’s the consequence of parse-server not returning a sessionToken, the client app tries to make some requests after linking but fails since linkwith returned no sessionToken
dplewis commentedon Jul 10, 2019
I was able to reproduce this issue.
Calling
_linkWithon an existing user is like doingobject.set('authData', authData)with validation. I think it should be alright to generate a sessionToken in this case.@acinader @davimacedo Thoughts?
davimacedo commentedon Jul 10, 2019
Yes. I think we should as described here.
elios264 commentedon Jul 10, 2019
also if you don't want to have to make a breaking change, is there a way to create a session for a user in cloud code?
acinader commentedon Jul 10, 2019
this could be a textbook example of opensource bug triage and fixing. wow.
parse-github-assistant commentedon Dec 6, 2021
The label
type:featurecannot be used in combination withtype:bug.