Answer the question
In order to leave comments, you need to log in
How to login via FB using JWT?
I'm trying in Symfony 3.4 to authorize via Facebook using JWT. But for some reason, JWT creates a token simply in text form, which causes an error:
Argument 2 passed to Symfony\Component\Security\Http\Event\InteractiveLoginEvent::__construct() must implement interface
Symfony\Component\Security\Core\Authentication\Token\TokenInterface, string given
// Если пользователь уже был создан ранее
$token = $this->get('lexik_jwt_authentication.jwt_manager')->create($user);
$user->setToken($token);
$event = new InteractiveLoginEvent($request, $token);
$this->get("event_dispatcher")->dispatch("security.interactive_login", $event);
return $this->redirectToRoute('homepage');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question