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

How to add authentication to graphql? #11

Open
annibuliful opened this issue May 24, 2018 · 4 comments
Open

How to add authentication to graphql? #11

annibuliful opened this issue May 24, 2018 · 4 comments

Comments

@annibuliful
Copy link

No description provided.

@sirsavary
Copy link
Owner

Adding authentication to GraphQL is quite easy, are you looking for a more high-level guide or something integrated with a library, such as Passport?

@annibuliful
Copy link
Author

I think that I will use Fastify Hook to create authentication. It's good or not?

@kwalski
Copy link

kwalski commented Oct 4, 2018

I have a preHandle hook which decodes a jwt and sets payload on the request. But I can't figure out how to access request object in graphql. Is there any way to pass it Inc context property of graphql options object

@kwalski
Copy link

kwalski commented Oct 4, 2018

Or should I set it in variables??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants