✅ Bypass ASP.NET Required authenticator

Im trying to return Forbid (403) to the user if a resource already exists it all works fine but the issue is that i get thrown errors about not implementing an authenticator middleware for it i already removed the lines that add the authenticator and authorization stuff and marked my function as AllowAnonymous but it doesnt seem to have much effect on it I would use an authenticator middleware if it was worth it but it really isnt for this project TLDR; How to return Forbid and similar without Authenticator middleware
2 Replies
x0rld7mo ago
throw a bad request not a forbidden 🤔
SCShocked from Human Resources
i typically use BadRequest when the user gave wrong data also it wont solve the issue later on when the backend is supposed to get accounting return StatusCode(403, myResponse); worked
Want results from more Discord servers?
Add your server
More Posts