Getting `AUTH_NOT_AUTHORIZED ` in version 13.0.0 and later
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Product
Hot Chocolate
Describe the bug
Starting with version 13.0.0-rc8
/13.0.0
all type fields with a [Authorize(Policy = "SomePolicy")]
annotation are now always returning an AUTH_NOT_AUTHORIZED
error:
{
"errors": [
{
"message": "The current user is not authorized to access this resource.",
"extensions": {
"code": "AUTH_NOT_AUTHORIZED"
}
}
]
}
Until version 13.0.0.-rc7
and without code changes everything works as expected.
Our implementation is very closed on what is described on the HC documentation.
I’ve checked both the release notes and migration guide on the website, but couldn’t find an clue.
I would be very thankful for any hint. At the moment we have to stick at version 13.0.0-rc7
.
Steps to reproduce
I’ve prepared two demo projects for both version 13.0.0-rc7
and 13.0.1
with instructions about how to reproduce the issue.
https://github.com/marcel-rudolph/hc13-issue-demo
Relevant log output
There are no further exceptions or log messages beside the above posted response example.
Additional Context?
No response
Version
13.0.1
Issue Analytics
- State:
- Created 7 months ago
- Reactions:3
- Comments:12 (8 by maintainers)
Top Results From Across the Web
bearer token seems not work - Unable to authenticate the ...
What happened: I try to use the bearer token visit kubernet /healthz interface through script: #!/bin/bash token=$(echo $1|base64 -d) echo ...
Read more >Firebase Auth domain not authorized error despite being ...
InvalidOperationException: 'Auth domain is not among the authorized ones. I researched on Google and found this guide ...
Read more >Authorization failed. You are not authorized to perform this ...
I'm attempting to make a request to the "upload document" endpoint in order to upload a new document. Authentication Method: I'm using basic ......
Read more >Duo Administration - Policy & Control
Configuring the authentication policy within Duo's global policy affects all Duo application and all users — whether the user is enrolled in Duo...
Read more >The auth is not working in .net core web api?
I created a project and in startup.cs add app.UseAuthentication(); and app.UseAuthrization(); and services.AddAuthentication().
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes and no 😃
YouTube episode is coming tomorrow.
youtube.chillicream.com
@WalissonPires I believe this is because the policy now by default runs on validation. So there will not be a resolver context and this is also why you get a HttpContext.
If you want to run it not on validation but BEFORE_RESOLVER then you have to specify it:
@psiservices-dbrink i agree this should go in the docs