Im currently using Graphql with Django Graphene JWT. Im using django for the backend. All requests are authed by the token shown below:
I have a schema that creates auth tokens for graphql that currently looks like this:
class Mutation(accounts_manager.schema.Mutation, device_manager.schema.Mutation, graphene.ObjectType):
token_auth = graphql_jwt.ObtainJSONWebToken.Field()
verify_token = graphql_jwt.Verify.Field()
refresh_token = graphql_jwt.Refresh.Field()
Im trying to find documentation and also understand how this will work.
I have a reactjs webapp that currently connects to the graphql api and now I am also building a react native app to connect to it too.
They way I see it is that Auth0 only keeps a token per user that then is used through graphql to be authed to django?
Im a little lost about how it should all work!
django-graphql-jwt
is used if you're creating your own JWTs, therefore since Auth0 provides you with one, you don't need to use it. I think all you need to do is pass the Auth0 token with each API request and verify it on the back-end (although I'm not sure how to do this, I'm working on it ATM). – Kissingertoken_auth
field, that a JWT in the same format asObtainJSONWebToken
same with the refresh token. – Tisiphone