# Authorization issue when running dgraph locally vs Slash

**URL:** <https://discuss.dgraph.io/t/authorization-issue-when-running-dgraph-locally-vs-slash/11971>\
**Category:** Dgraph\
**Created:** [December 17, 2020, 10:54pm UTC](https://discuss.dgraph.io/t/authorization-issue-when-running-dgraph-locally-vs-slash/11971 "2020-12-17T22:54:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![classified](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@classified](https://discuss.dgraph.io/u/classified)\
**Post date:** [December 17, 2020, 10:54pm UTC](https://discuss.dgraph.io/t/authorization-issue-when-running-dgraph-locally-vs-slash/11971/1 "2020-12-17T22:54:23Z")

</div>

* * *

## Report a Dgraph Bug

### What version of Dgraph are you using?

20.11.0 and Slash

### Have you tried reproducing the issue with the latest release?

Yes

### What is the hardware spec (RAM, OS)?

docker-compose so the specs are virtual

### Steps to reproduce the issue (command/config used to run Dgraph).

I am trying to use JWT for auth but it doesn’t work when running dgraph myself - it works in Slash.

Here’s a simple Todo

```auto
type Todo @withSubscription @auth(
    query: { rule: "{ $email: { eq: \"fff@fff.com\" } }"}
    add: { rule: "{ $email: { eq: \"fff@fff.com\" } }"}
    update: { rule: "{ $email: { eq: \"fff@fff.com\" } }"}
    delete: { rule: "{ $email: { eq: \"fff@fff.com\" } }"}
) {
    id: ID!
    value: String!
    completed: Boolean! @search
}

```

```auto
# Dgraph.Authorization {"VerificationKey":"-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----","Header":"X-Auth-Token","Namespace":"jhk324jk","Algo":"RS256"}

```

### Expected behaviour and actual result.

If I try to query or add data without the @auth, it works, when I add it back it doesnt. With @auth it only works on slash, but as soon as i change the url back to my docker onein apollo-client, it stops working again, unless if I remove @auth.
