3

I'm doing web application using graphql (ariadne) + Django. Now I want to integrate it with Facebook authentication without using DRF. So I wanted to use jwt. Is there any good practice or suggestions ? What is the proper way of doing authentication in graphql ?

Zorig
  • 585
  • 1
  • 10
  • 26
  • https://github.com/flavors/django-graphql-social-auth good package built on top of social python auth that is widely used – T. Opletal Nov 22 '19 at 10:57
  • Did you able to do it? – Serenity Aug 24 '20 at 02:19
  • @Serenity well, for my case i managed to restrict user authentication using a web server and it's authentication mechanism – Zorig Aug 25 '20 at 04:37
  • sorry i did not get you. Do you mean you used rest api for authentication and ariadne for other tasks? – Serenity Aug 25 '20 at 05:14
  • Well ariadne endpoint works on Django server right ?. So just checking `request.user.is_authenticated` in resolver did the work for my case. That way requests sending from Django itself has session cookie when sending request. You can check this by `includeCredentials` in ariadne playground settings. – Zorig Aug 25 '20 at 05:17
  • I tried https://github.com/flavors/django-graphql-social-auth, but what ever ant accessToken i input in it , it retruns th same user. Probably i need to asociate users with thier accessTokens?! – Ali Husham Mar 16 '21 at 18:09

0 Answers0