http://localhost:3000/oauth/token
\n{\n"error": "invalid_client",\n"error_description": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."\n}\nRun Code Online (Sandbox Code Playgroud)\n在实施门卫时..
\n于 2021 年 6 月 13 日 19:56:20 +0530 开始为 ::1 发布“/oauth/token”\n由 Doorkeeper::TokensController#create as / \n参数: {"grant_type"=>"password", "用户名”=>“bhagwan”,“密码”=>“[已过滤]”}\n用户负载(7.0 毫秒)选择“用户”。来自“用户”,其中“用户”。“电子邮件”=?限制 ?[["email", "bhagwan"], ["LIMIT", 1]]\n\xe2\x86\xb3 config/initializers/doorkeeper.rb:19:in `block (2 level) in '\nCompleted 401 Unauthorized在 1654 毫秒内(查看:0.5 毫秒 | ActiveRecord:28.7 毫秒 | 分配:5869) *
\n在门卫.rb中
\ngrant_flows %w[password]\n\nresource_owner_from_credentials do\nUser.find_by(email: params[:username])\n&.authenticate(params[:password]) || nil\nend\nRun Code Online (Sandbox Code Playgroud)\n