GraphQL Cookbook

Authenticating a user

2min

Authenticating a logged user through the Parse GraphQL API

Problem

You want to authenticate a logged user in your backend through the Parse GraphQL API.

Solution

Using the Parse GraphQL API, you can authenticate a logged user just by sending the user’s sessionToken (that you may have acquired by signing up or logging in this user) through the X-Parse-Session-Token header. This header can be sent in any operation and it will make this operation to be run in the behavior of the authenticated user.

The X-Parse-Session-Token can be easily set in the Parse Dashboard GraphQL Playground through the HTTP HEADERS option in the bottom left side of this tool.



Document image