Laravel 5.7护照返回始终在AWS服务器上未经身份验证

时间:2019-03-12 16:09:03

标签: php laravel apache amazon-ec2 laravel-passport

我正面临laravel身份验证问题。我遵循Laravel 5.7官方文档来处理身份验证。它可以在localhost上运行,但是当部署在AWS服务器上时,它会提供未认证的消息。 每个登录时间都会生成新令牌,但Laravel不会对其进行身份验证。

1 个答案:

答案 0 :(得分:0)

Apache is notorious for stripping the Authorization header. You'll want to verify you 
have that header in the incoming request.
Please add this (/etc/apache2/sites-available)

<Directory "/var/www">
AllowOverride All
</Directory>

https://askubuntu.com/questions/429869/is-this-a-correct-way-to-enable-htaccess-in-apache-2-4-7

Laravel Passport - /oauth/token generates invalid token