{"action":"created","issue":{"url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app/issues/34","repository_url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app","labels_url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app/issues/34/comments","events_url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app/issues/34/events","html_url":"https://github.com/gothinkster/aspnetcore-realworld-example-app/issues/34","id":334630611,"node_id":"MDU6SXNzdWUzMzQ2MzA2MTE=","number":34,"title":"JWT auth not working","user":{"login":"kalvarez2","id":10225272,"node_id":"MDQ6VXNlcjEwMjI1Mjcy","avatar_url":"https://avatars1.githubusercontent.com/u/10225272?v=4","gravatar_id":"","url":"https://api.github.com/users/kalvarez2","html_url":"https://github.com/kalvarez2","followers_url":"https://api.github.com/users/kalvarez2/followers","following_url":"https://api.github.com/users/kalvarez2/following{/other_user}","gists_url":"https://api.github.com/users/kalvarez2/gists{/gist_id}","starred_url":"https://api.github.com/users/kalvarez2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalvarez2/subscriptions","organizations_url":"https://api.github.com/users/kalvarez2/orgs","repos_url":"https://api.github.com/users/kalvarez2/repos","events_url":"https://api.github.com/users/kalvarez2/events{/privacy}","received_events_url":"https://api.github.com/users/kalvarez2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-21T19:42:15Z","updated_at":"2018-06-29T08:13:56Z","closed_at":null,"author_association":"NONE","body":"Hi\r\nFirst, thanks for creating a full production application, it is a great starting point! I do have a problem:\r\n\r\nConditions:\r\nI cloned the front end, made some cosmetic changes to it, still using the production server for back end, all works fine, I can log in, log out, create articles see the articles.\r\nI cloned this one front end, asp.net core, no changes whatsoever, ran it, change the UI side environment to point to it, then I can  register, log in, see the settings, log out, no problem. \r\n\r\nProblem:\r\nWhen I try to create an article, I get a 401 status code, with no more explanation on the response.\r\n\r\nRequest:\r\ncurl 'http://localhost:5000/articles/' -H 'Pragma: no-cache' -H 'Origin: http://localhost:4200' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'Authorization: Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJrYWx2YXJlejJAZ21haWwuY29tIiwianRpIjoiNzI0OTRkMTAtNGU0Yy00MzYwLWI1MGItNDMwMDMxYTEyMDgwIiwiaWF0IjoxNTI5NjA4OTg5LCJuYmYiOjE1Mjk2MDg5ODksImV4cCI6MTUyOTYwOTI4OSwiaXNzIjoiaXNzdWVyIiwiYXVkIjoiYXVkaWVuY2UifQ.IRmitcvS_CD9bo9kXwrO3gmQMUAS2aYTgaJpCqbESeE' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Cache-Control: no-cache' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36' -H 'Connection: keep-alive' -H 'Referer: http://localhost:4200/editor' --data-binary '{\"article\":{\"tagList\":[],\"title\":\"aaaa\",\"description\":\"aaaaaaaaaaaaaaa\",\"body\":\"aaaaaaaaaa\"}}' --compressed\r\n\r\nServer Log:\r\n15:23:32 [Information] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 OPTIONS http://localhost:5000/articles/  \r\n15:23:32 [Information] Microsoft.AspNetCore.Cors.Infrastructure.CorsService Policy execution successful.\r\n15:23:32 [Information] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 0.3615ms 204 \r\n15:23:32 [Information] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 POST http://localhost:5000/articles/ application/json 93\r\n15:23:32 [Information] Microsoft.AspNetCore.Cors.Infrastructure.CorsService Policy execution successful.\r\n15:23:32 [Information] Microsoft.AspNetCore.Authorization.DefaultAuthorizationService Authorization failed for user: null.\r\n15:23:32 [Information] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Authorization failed for the request at filter '\"Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter\"'.\r\n15:23:32 [Information] Microsoft.AspNetCore.Mvc.ChallengeResult Executing ChallengeResult with authentication schemes ([\"Token\", \"Bearer\"]).\r\n15:23:32 [Information] Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler AuthenticationScheme: \"Token\" was challenged.\r\n15:23:32 [Information] Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler AuthenticationScheme: \"Bearer\" was challenged.\r\n15:23:32 [Information] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action \"Conduit.Features.Articles.ArticlesController.Create (Conduit)\" in 0.7429ms\r\n15:23:32 [Information] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 4.3307ms 401 \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app/issues/comments/401282879","html_url":"https://github.com/gothinkster/aspnetcore-realworld-example-app/issues/34#issuecomment-401282879","issue_url":"https://api.github.com/repos/gothinkster/aspnetcore-realworld-example-app/issues/34","id":401282879,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTI4Mjg3OQ==","user":{"login":"adamhathcock","id":527620,"node_id":"MDQ6VXNlcjUyNzYyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/527620?v=4","gravatar_id":"","url":"https://api.github.com/users/adamhathcock","html_url":"https://github.com/adamhathcock","followers_url":"https://api.github.com/users/adamhathcock/followers","following_url":"https://api.github.com/users/adamhathcock/following{/other_user}","gists_url":"https://api.github.com/users/adamhathcock/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhathcock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhathcock/subscriptions","organizations_url":"https://api.github.com/users/adamhathcock/orgs","repos_url":"https://api.github.com/users/adamhathcock/repos","events_url":"https://api.github.com/users/adamhathcock/events{/privacy}","received_events_url":"https://api.github.com/users/adamhathcock/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T08:13:56Z","updated_at":"2018-06-29T08:13:56Z","author_association":"COLLABORATOR","body":"Using https://github.com/gothinkster/angular-realworld-example-app to test"}}
{"actor":{"display_login":"adamhathcock"}}