When OAuth password verification fails, return 401 instead of redirect (#5111)
When OAuth password verification fails, return 401 instead of redirect (#5111)

Call to warden.authenticate! in resource_owner_from_credentials would
make the request redirect to sign-in path, which is a bad response for
apps. Now bad credentials just return nil, which leads to HTTP 401
from Doorkeeper. Also, accounts with enabled 2FA cannot be logged into
this way.
TheInventrix/mastodon,Nyoho/mastodon,pixiv/mastodon,esetomo/mastodon,lindwurm/mastodon,kirakiratter/mastodon,musashino205/mastodon,h3zjp/mastodon,danhunsaker/mastodon,codl/mastodon,hugogameiro/mastodon,rutan/mastodon,ykzts/mastodon,vahnj/mastodon,SerCom-KC/mastodon,mosaxiv/mastodon,yukimochi/mastodon,honpya/taketodon,dunn/mastodon,vahnj/mastodon,musashino205/mastodon,theoria24/mastodon,imas/mastodon,kazh98/social.arnip.org,maa123/mastodon,im-in-space/mastodon,riku6460/chikuwagoddon,abcang/mastodon,masarakki/mastodon,amazedkoumei/mastodon,codl/mastodon,anon5r/mastonon,clworld/mastodon,masarakki/mastodon,yukimochi/mastodon,PlantsNetwork/mastodon,anon5r/mastonon,unarist/mastodon,masto-donte-com-br/mastodon,unarist/mastodon,blackle/mastodon,amazedkoumei/mastodon,yukimochi/mastodon,Craftodon/Craftodon,primenumber/mastodon,foozmeat/mastodon,pointlessone/mastodon,cybrespace/mastodon,mstdn-jp/mastodon,kirakiratter/mastodon,tootcafe/mastodon,rainyday/mastodon,maa123/mastodon,TheInventrix/mastodon,mimumemo/mastodon,clworld/mastodon,lynlynlynx/mastodon,rutan/mastodon,imas/mastodon,tootsuite/mastodon,5thfloor/ichiji-social,d6rkaiz/mastodon,primenumber/mastodon,pointlessone/mastodon,ykzts/mastodon,h3zjp/mastodon,foozmeat/mastodon,honpya/taketodon,NS-Kazuki/mastodon,yi0713/mastodon,rainyday/mastodon,honpya/taketodon,SerCom-KC/mastodon,tootcafe/mastodon,foozmeat/mastodon,dwango/mastodon,glitch-soc/mastodon,mosaxiv/mastodon,mstdn-jp/mastodon,MastodonCloud/mastodon,mimumemo/mastodon,KnzkDev/mastodon,kazh98/social.arnip.org,danhunsaker/mastodon,MastodonCloud/mastodon,ikuradon/mastodon,SerCom-KC/mastodon,cobodo/mastodon,koba-lab/mastodon,Craftodon/Craftodon,glitch-soc/mastodon,5thfloor/ichiji-social,lynlynlynx/mastodon,pinfort/mastodon,NS-Kazuki/mastodon,cobodo/mastodon,riku6460/chikuwagoddon,WitchesTown/mastodon,Arukas/mastodon,rainyday/mastodon,rutan/mastodon,hugogameiro/mastodon,Ryanaka/mastodon,WitchesTown/mastodon,rekif/mastodon,mstdn-jp/mastodon,d6rkaiz/mastodon,pointlessone/mastodon,imas/mastodon,pso2club/mastodon,mhffdq/mastodon,musashino205/mastodon,dunn/mastodon,Chronister/mastodon,im-in-space/mastodon,abcang/mastodon,mimumemo/mastodon,vahnj/mastodon,mosaxiv/mastodon,PlantsNetwork/mastodon,gol-cha/mastodon,musashino205/mastodon,kirakiratter/mastodon,Kirishima21/mastodon,amazedkoumei/mastodon,sylph-sin-tyaku/mastodon,vahnj/mastodon,maa123/mastodon,KnzkDev/mastodon,tri-star/mastodon,mimumemo/mastodon,summoners-riftodon/mastodon,TheInventrix/mastodon,rainyday/mastodon,primenumber/mastodon,koba-lab/mastodon,increments/mastodon,yi0713/mastodon,mhffdq/mastodon,anon5r/mastonon,gol-cha/mastodon,tootcafe/mastodon,d6rkaiz/mastodon,codl/mastodon,abcang/mastodon,pso2club/mastodon,riku6460/chikuwagoddon,pinfort/mastodon,increments/mastodon,pixiv/mastodon,blackle/mastodon,vahnj/mastodon,ykzts/mastodon,rekif/mastodon,pointlessone/mastodon,glitch-soc/mastodon,NS-Kazuki/mastodon,MitarashiDango/mastodon,rekif/mastodon,Chronister/mastodon,unarist/mastodon,res-ac/mstdn.res.ac,masarakki/mastodon,clworld/mastodon,mosaxiv/mastodon,WitchesTown/mastodon,dunn/mastodon,tootcafe/mastodon,tootsuite/mastodon,res-ac/mstdn.res.ac,summoners-riftodon/mastodon,theoria24/mastodon,pixiv/mastodon,increments/mastodon,h3zjp/mastodon,sylph-sin-tyaku/mastodon,koba-lab/mastodon,lindwurm/mastodon,Ryanaka/mastodon,im-in-space/mastodon,lynlynlynx/mastodon,mstdn-jp/mastodon,unarist/mastodon,amazedkoumei/mastodon,TheInventrix/mastodon,kazh98/social.arnip.org,MitarashiDango/mastodon,yi0713/mastodon,cobodo/mastodon,ykzts/mastodon,glitch-soc/mastodon,MitarashiDango/mastodon,esetomo/mastodon,MastodonCloud/mastodon,tateisu/mastodon,yukimochi/mastodon,imas/mastodon,SerCom-KC/mastodon,kazh98/social.arnip.org,dwango/mastodon,dunn/mastodon,PlantsNetwork/mastodon,mhffdq/mastodon,riku6460/chikuwagoddon,ambition-vietnam/mastodon,Nyoho/mastodon,Kirishima21/mastodon,Kirishima21/mastodon,d6rkaiz/mastodon,honpya/taketodon,Kirishima21/mastodon,Ryanaka/mastodon,ambition-vietnam/mastodon,tootsuite/mastodon,ikuradon/mastodon,esetomo/mastodon,KnzkDev/mastodon,pinfort/mastodon,tri-star/mastodon,hugogameiro/mastodon,Ryanaka/mastodon,masto-donte-com-br/mastodon,Nyoho/mastodon,lindwurm/mastodon,pinfort/mastodon,esetomo/mastodon,Craftodon/Craftodon,Chronister/mastodon,codl/mastodon,primenumber/mastodon,lindwurm/mastodon,res-ac/mstdn.res.ac,NS-Kazuki/mastodon,lynlynlynx/mastodon,tateisu/mastodon,increments/mastodon,salvadorpla/mastodon,anon5r/mastonon,gol-cha/mastodon,danhunsaker/mastodon,cybrespace/mastodon,danhunsaker/mastodon,PlantsNetwork/mastodon,theoria24/mastodon,salvadorpla/mastodon,TheInventrix/mastodon,kirakiratter/mastodon,dwango/mastodon,Nyoho/mastodon,salvadorpla/mastodon,clworld/mastodon,salvadorpla/mastodon,mhffdq/mastodon,gol-cha/mastodon,pixiv/mastodon,ikuradon/mastodon,blackle/mastodon,Arukas/mastodon,hugogameiro/mastodon,blackle/mastodon,Arukas/mastodon,rekif/mastodon,summoners-riftodon/mastodon,pso2club/mastodon,res-ac/mstdn.res.ac,masto-donte-com-br/mastodon,yi0713/mastodon,im-in-space/mastodon,cybrespace/mastodon,pso2club/mastodon,Craftodon/Craftodon,foozmeat/mastodon,KnzkDev/mastodon,Chronister/mastodon,5thfloor/ichiji-social,5thfloor/ichiji-social,tateisu/mastodon,abcang/mastodon,cybrespace/mastodon,dwango/mastodon,rutan/mastodon,tootsuite/mastodon,cobodo/mastodon,masarakki/mastodon,sylph-sin-tyaku/mastodon,tri-star/mastodon,ikuradon/mastodon,koba-lab/mastodon,WitchesTown/mastodon,theoria24/mastodon,ambition-vietnam/mastodon,MastodonCloud/mastodon,maa123/mastodon,Arukas/mastodon,summoners-riftodon/mastodon,h3zjp/mastodon,masto-donte-com-br/mastodon,sylph-sin-tyaku/mastodon,tri-star/mastodon,tateisu/mastodon,ambition-vietnam/mastodon,MitarashiDango/mastodon