Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 Unauthorized | invalid credentials | loadUserByIdentifier #874

Closed
mdieudonne opened this issue Jun 12, 2021 · 1 comment · Fixed by #872
Closed

401 Unauthorized | invalid credentials | loadUserByIdentifier #874

mdieudonne opened this issue Jun 12, 2021 · 1 comment · Fixed by #872

Comments

@mdieudonne
Copy link

mdieudonne commented Jun 12, 2021

Hi,

After upgrading to Sf 5.3, I get a 401 right after login.

In vendor/lexik/jwt-authentication-bundle/Security/Guard/JWTTokenAuthenticator.php

Replacing return $userProvider->loadUserByUsername($identity); with return $userProvider->loadUserByIdentifier($identity);
solves the problem.

Is there an update about to be published?

@mdieudonne mdieudonne changed the title 401 Unauthorized 401 Unauthorized | invalid credentials Jun 12, 2021
@mdieudonne mdieudonne changed the title 401 Unauthorized | invalid credentials 401 Unauthorized | invalid credentials | loadUserByIdentifier Jun 12, 2021
@mynameisbogdan
Copy link

If you're implementing UserLoaderInterface using this example doesn't fixes your issue?

public function loadUserByUsername(string $username)
{
   return $this->loadUserByIdentifier($username);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants