перенаправление брандмауэров Symfony 4 - PullRequest
0 голосов
/ 30 мая 2019

Здравствуйте, у меня проблема с операцией входа, когда для более подробного объяснения, есть 2 кнопки:

  • вход (с электронной почтой и паролем)
  • вход с помощью gmail, когда я нажимаювведите адрес электронной почты и пароль, нажмите «Войти», перенаправьте меня, чтобы выбрать учетную запись Gmail, но я хочу войти в систему с помощью адреса электронной почты и пароля.

, и это файл security.yaml

security.yaml

encoders:
    App\Entity\User:
        algorithm: argon2i

# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
    # used to reload user from session & other features (e.g. switch_user)
    app_user_provider:
        entity:
            class: App\Entity\User
            property: email
firewalls:
    dev:
        pattern: ^/(_(profiler|wdt)|css|images|js)/
        security: false   
    main:
        anonymous: ~
        guard:
            authenticators:
                - App\Security\GoogleAuthenticator
                - App\Security\LoginFormAuthenticator
            entry_point: App\Security\LoginFormAuthenticator

        logout: 
            path: logout 
        # activate different ways to authenticate

        # http_basic: true
        # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate

        # form_login: true
        # https://symfony.com/doc/current/security/form_login_setup.html

# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
      - { path: ^/admin, roles: ROLE_ADMIN }
      - { path: ^/profile, roles: ROLE_USER }
      - { path: ^/car, roles: ROLE_USER }

как решить эту проблему

...