'info.context.user returns AnonymousUser when using JWT graphql authentication

I cannot replicate the example regarding the authentication with JWT using graphql and provided in the tutorial https://www.howtographql.com/graphql-python/4-authentication/. The "me" query does always fails cause we get the value AnonymousUser from info.context.user instead of the authenticated user by the JWT token in the http header.

Did anyone face this problem before?

Many thanks in advance,



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source