Authentication in Relay & GraphQL

I am working on an application that uses reaction and relays, and now I'm stuck in implementing authentication.

I know that you can pass a value to each graphql query through the context available in GraphQL to solve problems.

I am more confused by what I need to go through and how.

Is it better to use a JSON Web token, passport, something else? And how to pass the identifier for the user?

Basically, what I'm asking is What is best for Relay: jwt, passport, something else? And how to connect it to the relay. Thank you

+4
source share
2 answers

, . , JWT - , , .

:

  • . - , .
  • . , , iOS/Android.
  • . FB auth setup ( , ) JWT cookie. , - GraphQL , .

jwt/ . . jwt auth, jwt. - server .

JWT , HttpOnly (. ). , Relay.

+3

cyberwombats . AWS Cognito, FB Cognito, . JWT, Cognito.

, , Cognito Auth0 . () auth, auth, .. JWT cookie, GraphQL .

( , ), .

0

Source: https://habr.com/ru/post/1649314/


All Articles