I am trying to configure the login system using the Entity Entity provider, but I always get this error:
No encoder has been configured for account "Prefix\MainBundle\Entity\Admin"
Here is my setup:
security.yml
security: encoders: Prefix\MainBundle\Entity\Admin: algorithm: sha1 encode_as_base64: false iterations: 1 role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ] providers: administrators: entity: { class: PrefixMainBundle:Admin, property: username } firewalls: administrators: pattern: ^/admin/ anonymous: ~ provider: administrators form_login: login_path: /admin/login check_path: /admin/login_check access_control: - { path: ^/admin/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin, roles: ROLE_ADMIN }
I have an Entity created and implementing UserInterface, but I can't get it to work, it would be great if someone could shed some light on this.
Khriz source share