我正在使用Laravel 9,扩展Laravel进行认证。我有由auth中间件(\App\Http\Middleware\Authenticate.php)保护的路由,其中我指定了redirectTo()应该返回route('auth.login')。这大约是在我为API认证引入Laravel的同时。当我在我的应用程序的Authenticate.php中扩展这个类时,我意识到以下内容有效,并且我得到了一个404错误:
protected function unauthenticated
我使用Laravel 6护照为我的Vue后端授予密码。当我向oauth/ token 发送正确的凭据时,它工作并返回令牌,但当我发送错误(电子邮件/密码)时,它将返回400,而不是带有此消息的401。the authorization request, or was issued to another client."我检查了client_secret.和client_id
我用新安装的 Laravel+护照进行了测