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

Can i user SimpleJwt from Rest for my GraphQl API? #367

Closed
deepanshu-nickelfox opened this issue Feb 1, 2021 · 4 comments
Closed

Can i user SimpleJwt from Rest for my GraphQl API? #367

deepanshu-nickelfox opened this issue Feb 1, 2021 · 4 comments
Labels

Comments

@deepanshu-nickelfox
Copy link

deepanshu-nickelfox commented Feb 1, 2021

Hi,
i am already using API in RestFramework, and also in same project i have implemented the GraphQl and now i want to secure it with Simple JWT. My question is, Is there any way to achive this?

@Andrew-Chen-Wang
Copy link
Member

I mean probably? I don't know what GraphQL package you're using; if it integrates with DRF, then it should work. If anything, just set SimpleJWT to the default authentication method and test it out, with and without a Bearer token.

@deepanshu-nickelfox
Copy link
Author

I am using "graphene" and i have already set SimpleJWT as default authentication,
but still the APIs are not secure.

any method or snipp that you can share, will be a great help!

@Andrew-Chen-Wang
Copy link
Member

From a couple of Google searches, it seems like graphene is separate from DRF, but a quick search shows: graphql-python/graphene#249

Try using that view and see if that helps!

@deepanshu-nickelfox
Copy link
Author

deepanshu-nickelfox commented Feb 1, 2021

Thanks i think it must be a great help ! 🔥 🔥
@Andrew-Chen-Wang

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

No branches or pull requests

2 participants