I\'ve been working on an application using react and relay, and now I\'m stuck on implementing authentication.
I know that you can pass value to each graphql request th
I'm the author of the first example in cyberwombats answer and currently developing a new universal relay starter kit. It has authentication via AWS Cognito included and there is a FB login via Cognito, though it's not fully working yet. It uses JWT tokens issued by Cognito.
Passport may also be an alternative, if you need to implement the authentication workflow yourself instead of using Cognito or Auth0 or similar services. You could implement a (separate) auth server exposing auth endpoints like login etc. This server can set a JWT in a cookie which may be used on the GraphQL server for authentication.
The starter kit is still under development (refresh token are not used yet for example), but it is kind of usable already.