question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Not Authorised!

See original GitHub issue

Played all the steps in this example https://github.com/prisma/prisma-examples/tree/master/node/graphql-auth but upon request

mutation {
  writeComment(
    postId: "ck0s5cssnii0f0b175f5umhjx" 
    text: "I like turtles 🐢"
  ) {
    id
    text
  }
}

I get this error

Error: Not Authorised!
    at normalizeOptions (/Users/playra/prisma-examples/node/graphql-auth/node_modules/graphql-shield/dist/shield.js:25:44)
    at shield (/Users/playra/prisma-examples/node/graphql-auth/node_modules/graphql-shield/dist/shield.js:38:31)
    at Object.<anonymous> (/Users/playra/prisma-examples/node/graphql-auth/src/permissions/index.js:21:21)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/playra/prisma-examples/node/graphql-auth/src/index.js:4:25)

Updated HTTP HEADERS

{
  "Authorization": "Bearer ….”
}

But request

{
  me {
    id
    name
    email
  }
}

with the same HTTP HEADERS works. What is the problem?

Screenshot 2019-09-20 at 17 33 53

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
gHashTagcommented, Sep 23, 2019

For two years, observe your project, it is shocking that you do not have testers who will verify what you write in the documentation. @nikolasburk please answer

0reactions
gHashTagcommented, Nov 27, 2019

@nikolasburk Thank you I switched to AWS Amplify, which is very pleased.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message: You are not authorized to access this ...
After successfully authenticating to the portal, the following error is immediately displayed: You are not authorized to access this application. For assistance ...
Read more >
Why am I receiving a message that I am 'not authorized' to ...
A message saying that you are not authorized, need to re-authenticate, or that there was an authentication error, comes directly from your TV...
Read more >
Fix the 'You are not authorized to view this page' error message
"You are not authorized to view this page" appears when configuring the Messaging Security Agent (MSA) of Worry-Free Business Security (WFBS) running on...
Read more >
How to troubleshoot the "You are not authorized to start ... - IBM
An error message is displayed that reads "Authorization Error: Ensure that you are authorized to access and run this client-side human service, ...
Read more >
Not Authorized" message when trying to access an assignment?
The reason you are getting an “Error: Not Authorized” message when trying to access an assignment is because the link to the assignment...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found