I can't authorize an endpoint in asp.net core app - C#