# How to put AUTH0 pem public key in # Dgraph.Authorization {"VerificationKey":"\<AUTH0-APP-PUBLIC-KEY\>"}

**URL:** <https://discuss.dgraph.io/t/how-to-put-auth0-pem-public-key-in-dgraph-authorization-verificationkey-auth0-app-public-key/12847>\
**Category:** Dgraph Cloud\
**Tags:** kind:question, dgraph\
**Created:** [February 19, 2021, 2:07pm UTC](https://discuss.dgraph.io/t/how-to-put-auth0-pem-public-key-in-dgraph-authorization-verificationkey-auth0-app-public-key/12847 "2021-02-19T14:07:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tintin10q](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tintin10q/32/6293_2.png) [@tintin10q](https://discuss.dgraph.io/u/tintin10q)\
**Post date:** [February 19, 2021, 2:07pm UTC](https://discuss.dgraph.io/t/how-to-put-auth0-pem-public-key-in-dgraph-authorization-verificationkey-auth0-app-public-key/12847/1 "2021-02-19T14:07:15Z")

</div>

I am following this guide [https://dgraph.io/docs/master/graphql/todo-app-tutorial/todo-auth0-jwt/](https://dgraph.io/docs/master/graphql/todo-app-tutorial/todo-auth0-jwt/)

I am trying to put my pem key from auth0 into the # Dgraph.Authorization thing to get the @auth field to work. However I have problems trying to put the public key. I keep getting the error message: “resolving updateGQLSchema failed because invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key” It is not clear for me what I am doing wrong how should I format the key?

I downloaded the certificate from auth0 in pem format and used the `openssl x509 -pubkey -noout -in file_name.pem` command to get the public key.  
The guide says it has to be on one line and I think this is where it goes wrong. The guide mentions “Next is the VerificationKey, so update with your public key within the quotes and make sure to have it in a single line and add \n where ever needed.” I have tried to submit the key in different ways with and without \n but it is all not working I keep getting that error message.

Here you can find my public key:  
[https://filebin.net/zpusjp72vcv5rs4n/my\_public\_key.key?t=n2r3hmch](https://filebin.net/zpusjp72vcv5rs4n/my_public_key.key?t=n2r3hmch)

Could someone help me and send me a working # Dgraph.Authorization {“VerificationKey”:""} with my pem key fillled in? That would be amazing. It has been a journey and I feel like this is the last step.

Thanks,

Quinten

---

<div class="post-metadata">

**Author:** ![verneleem](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/verneleem/32/5801_2.png) [@verneleem](https://discuss.dgraph.io/u/verneleem)\
**Post date:** [February 19, 2021, 11:05pm UTC](https://discuss.dgraph.io/t/how-to-put-auth0-pem-public-key-in-dgraph-authorization-verificationkey-auth0-app-public-key/12847/2 "2021-02-19T23:05:31Z")

</div>

This should be a working copy. Make sure to replace the **values** for `Header`, `Namespace`, and `Audience`

```auto
# Dgraph.Authorization {"Header":"Your-Token-Header-Key-Here","Namespace":"Your-Custom-Claims-Namespace-Here","Algo":"RS256","Audience":["Your-Auth0-Cliend-ID-Here"],"VerificationKey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn0SyR2qeSv23vcYqNkBo\nBPU6i9fq0kf8cISRJvtI8ifSDY04/+3L2IAsDEBreXUFrUQthmQnWiiK/m6QM0EI\nXtLPF59YChbc2Veub9ZBWbd9k/AFf0Os7v7xzR1DJhMPzhel9+7L0GTv0VyGm4Jr\nFBZwT03eYVq4JVBrD0dUn02NTU2FF7y7FlyPbvIWWctuomxDpZuLA95UlxadG31S\nUR9F3g6Whnu6vM6DBUUvChoidtdNdU8yj9DJy8GJXXLvSoZH5Iecs6ERYu2dFcdm\n1MqjlAxSK8dTQA0vq8pInCONXGgF98DxBAiagjR4+dV3EA9VmgHIJX1R+YcK6URT\n1QIDAQAB\n-----END PUBLIC KEY-----"}

```

---

<div class="post-metadata">

**Author:** ![tintin10q](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tintin10q/32/6293_2.png) [@tintin10q](https://discuss.dgraph.io/u/tintin10q)\
**Post date:** [February 20, 2021, 1:30am UTC](https://discuss.dgraph.io/t/how-to-put-auth0-pem-public-key-in-dgraph-authorization-verificationkey-auth0-app-public-key/12847/3 "2021-02-20T01:30:19Z")

</div>

Thanks that helped me out now I can move forward 😀 I think I was not adding the \n after the strings with -----

Thanks
