Questions tagged [symfony-guard]
22 questions
4
votes
2 answers
Symfony authentication with guard always return "Username could not be found."
I know there are a lot of threads on this subject, but none of them helped me...
I am working on an application on which you have to send an access token in the headers for each request.
I manage this security with Guard.
For my tests, when I send a…

Nathan Meyer
- 312
- 7
- 18
3
votes
2 answers
Symfony 4 guard not authenticate user
I'm using guard as my authentication layer for my symfony 4 flex app.
whenever I enter in my username and password it automatically redirects me to the login page, no errors just redirects me. In my logs it shows that I couldn't log in but the form…
2
votes
0 answers
Symfony Guard or Userprovider - username always null
My Request goes through a ApiUserAuthenticator extends AbstractGuardAuthenticator to authenticate a request to an API. In the getUser() method I return an ApiUser.
public function getUser($credentials, UserProviderInterface $userProvider)
{
…

arno
- 792
- 14
- 33
2
votes
1 answer
Symfony4 guard authenticator doesn't work, no errors returned when log in
I am currently building a Symfony4 application with a custom guard authenticator. But I have a problem, when I try to log in with the login form I am not authenticated and I got no error message.
I have tried many things, like changing supports…

alex205_
- 21
- 3
2
votes
1 answer
Symfony's Guard start() function not working
I'm new to Symfony and I'm learning how to use Guard to authenticate users. Currently using Symfony 2.8.4.
You can check all my code below, it's mostly from various tutorials I found online.
It seems the start() function from the…

RektByAyyLMAO
- 165
- 1
- 11
2
votes
0 answers
Symfony - Guard authentification
I am implementing a login system with guard in my symfony application.
I already setup the system, but i did one mistake, therefore i cant login...
The essentials:
My User Entity implements "AdvancedUserInterface, \Serializable" and it provides…

Creative crypter
- 1,348
- 6
- 30
- 67
1
vote
0 answers
symfony guard authenticator is not being called
I'm working with ldaptools-bundle, fosuserbundle in an api endpoint.
My security.yaml looks like this
security:
encoders:
FOS\UserBundle\Model\UserInterface: bcrypt
LdapTools\Bundle\LdapToolsBundle\Security\User\LdapUser:…

Juan I. Morales Pestana
- 1,057
- 1
- 10
- 34
1
vote
0 answers
Symfony - Guard authenticator lost user after success login
I'm implementing a login system with guard authentication in my symfony application. I've already started to implement the system but I must be doing something incorrectly.
I will start by showing what I have implemented and in the end explain what…

D. Pinheiro
- 646
- 4
- 18
1
vote
0 answers
Symfony Guard Authenticator customize logout function
I'm new to Symfony and I'm learning how to use Guard to authenticate users. Currently using Symfony 3.2. I followed Creating your first Symfony app and adding authentication tutorial which helped me alot but in my aplication I have to add some…

boosterV
- 119
- 2
- 11
1
vote
1 answer
symfony3 guard login form doesn't authenticate
I try to make a form login authentication with guard (symfony 3.2) but it doesn't work.
The authentication is working, but when I'm redirected to the home page (accueil), I'm redirected to the login page without anthentication.
If I put in the…

lemairep
- 412
- 2
- 13
1
vote
1 answer
Symfony3 Guard and login form
I try to use Guard to make a login form instead of the security.yml way.
Getuser and checkcredential are ok.
onAuthenticationSuccess is ok (if I put a dump($token); die; in onAuthenticationSuccess I can see my user in the token) and redirect to…

lemairep
- 412
- 2
- 13
1
vote
2 answers
Symfony2 guard inactive session lifetime
I try to expire user session if it's inactive for X seconds. I've find many solutions to do that, but not for an inactive session.
I use Symfony2 with Guard Authentification. I've implemented this solution, which seems not bad. But the session…

kawai
- 27
- 8
1
vote
1 answer
symfony3 configuration with yaml
I am using Guard as new authentification system.
I registered a new service like this:
app.form_login_authenticator:
class: AppBundle\Security\FormLoginAuthenticator
arguments:
- @security.password_encoder
- @router
and…

Creative crypter
- 1,348
- 6
- 30
- 67
0
votes
1 answer
Symfony PHPUnit tests don't authenticate user
I have a Symfony 4.4 project. Login, authentication, and authorization work fine on web.
To simulate authentication in unit tests, I'm using Symfony's example.
...but that's not working. The user is not authenticated in the unit test. I get an…

amacrobert
- 2,707
- 2
- 28
- 37
0
votes
1 answer
Authenticate anonymously with roles
I have an Authenticator that needs to authenticate the user anonymously, but include a role. I do this by overriding createAuthenticatedToken in the Authenticator:
class ClientAuthenticator extends AbstractGuardAuthenticator
{
// supports(),…

amacrobert
- 2,707
- 2
- 28
- 37