小编Koj*_*ojo的帖子

Symfony 4登录表单:身份验证成功,但是重定向后身份验证立即丢失

我按照此表单登录设置文档构建了一个登录表单。

这在localhost 可以正常工作,但在生产服务器不能正常工作。

在localhost和prod上,身份验证成功开始

  1. Guard认证成功
  2. 警卫验证者设置成功响应
  3. 将安全令牌存储在会话中
  4. 匹配的路线“ easyadmin

    ### var/log/prod.log output with info level
    [2019-07-05 10:28:46] request.INFO: Matched route "app_login". {"route":"app_login","route_parameters":{"_route":"app_login","_controller":"App\\Controller\\SecurityController::login"},"request_uri":"https://example.com/login","method":"POST"} []
    [2019-07-05 10:28:46] security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"main","authenticators":1} []
    [2019-07-05 10:28:46] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"main","authenticator":"App\\Security\\LoginFormAuthenticator"} []
    [2019-07-05 10:28:46] security.DEBUG: Calling getCredentials() on guard authenticator. {"firewall_key":"main","authenticator":"App\\Security\\LoginFormAuthenticator"} []
    [2019-07-05 10:28:46] security.DEBUG: Passing guard token information to the GuardAuthenticationProvider {"firewall_key":"main","authenticator":"App\\Security\\LoginFormAuthenticator"} []
    [2019-07-05 10:28:46] php.INFO: User Deprecated: The "Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder" class …
    Run Code Online (Sandbox Code Playgroud)

authentication symfony symfony4

5
推荐指数
2
解决办法
1445
查看次数

标签 统计

authentication ×1

symfony ×1

symfony4 ×1