Skip to content

Call cloud function in cloud function, pass sessionToken not working  #363

Closed

Description

@flessard

If you try to call an other cloud function inside a cloud function and you try to pass the sessionToken to get the user in the other cloud function. Not working.

return Parse.Cloud.run('getUserRole', data, {
    sessionToken: request.user.get("sessionToken")
});
Parse.Cloud.define("getUserRole", function(request, response) {
    request.user // is undefined
})

Activity

  1. gfosco commented on Feb 11, 2016

    @gfosco
    Contributor

    try request.user.getSessionToken(); instead and let us know if that fixes it.

  2. flessard commented on Feb 11, 2016

    @flessard
    ContributorAuthor

    No, doesn't fix the problem.

  3. thibauddavid commented on Feb 12, 2016

    @thibauddavid

    @flessard Did you finally manage to get request.user working ( #269 ), or is it still only after fetching user data from server ?

  4. flessard commented on Feb 12, 2016

    @flessard
    ContributorAuthor

    @Tibabal i just make pull request to fix this bug

  5. gfosco commented on Feb 12, 2016

    @gfosco
    Contributor

    Yep, this will be addressed in #373.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions