Skip to content
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

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

Closed
flessard opened this issue Feb 11, 2016 · 5 comments
Closed
Labels
type:question Support or code-level question

Comments

@flessard
Copy link
Contributor

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
})
@gfosco
Copy link
Contributor

gfosco commented Feb 11, 2016

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

@flessard
Copy link
Contributor Author

No, doesn't fix the problem.

@thibauddavid
Copy link

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

@flessard
Copy link
Contributor Author

@Tibabal i just make pull request to fix this bug

@gfosco
Copy link
Contributor

gfosco commented Feb 12, 2016

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
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants