drupal-graphql / drupal-decoupled-app

Decoupled Drupal demo application based on React, GraphQL and Apollo including server-side rendering.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authentication Example: JWT w/ protected content

justinlevi opened this issue · comments

Realize this would be a feature request but it would be great to see an example logging in and accessing content that requires authenticated permissions.

The examples and documentation for handling this common situation seem to be pretty sparse, especially in the decoupled drupal world. I'm not sure if there is a viable solution for authenticating and returning an appropriate JWT token that would work for future request.

Great project and thanks for sharing. You guys do some pretty amazing work.

Yeah, once I find the time I will turn this into a full example including login, multilingual and mutations.

👍 for a multi language example

@fubhy Hey quick question, how to enable /graphql endpoint to use JWT as authentication provider?

@acidaniel Just enable the JWT Auth module. Authentication is a global concept in Drupal and has nothing to do with, or rather, is orthogonal to this module or any other module.

PS: This issue was close on March 28th, also this is not the graphql module issue queue. ;-)

@fubhy Yes I agree just suddenly this question jump on my mind :) Thanks!