This is a simple sample app to reproduce a bug since 3.4.2 of Parse JS SDK when using userFromJWT
feature in cloud functions with request.user
.
- Start MongoDB Runner
mongodb-runner start
yarn install
yarn start
// starts the parse-server instanceyarn relation
// Creates a new test user and related object or returns existing one, then callstestRelation
cloud function which fails to return something.- Change
authenticateIfNeeded
inapp.ts
as explained to fix it
The bug seems connected to using req['userFromJwt']
, as you can send a valid session token in the request instead of Authorization
header -> cloud function returns correct results.
- JS SDK <= 3.4.1: The above created relation is returned correctly
- JS SDK >= 3.4.2: No results are returned