I used the auth directive in Neo4j Graphql, but it's throwing "Unauthenticated" error even when the "authorization" header is set with a valid JWT. Why is this happening?
Did you verify your Token with a "Secret"? You must decode the header and verify your Token with a secret. Usually, this secret is provided to you by the authentication service provider like (Firebase, AWS...).
What authentication provider are you using ??
Am assigning token myself using jsonwebtoken with a secret in the environment variables. But it working now. I included 'Bearer' in the authorization header, so everything is good. Thank you.