Category: lexikjwtauthbundle

How to set cookies for response in GraphQL mutation in Symfony 5?

How to set cookies for response in GraphQL resolver in Symfony 5? I am generating JWT token in mutation resolver and I want to set this token to Http cookie. // LoginMutator.php namespace AppGraphQLMutatorsSecurity; … class LoginMutator implements MutationInterface {…

How to test a lexik_jwt_authentication protected API using http_client? [closed]

I am writing some functional test and looks like the client can’t find the controller for the route, this is the code for my test: $response = static::createClient()->request( ‘POST’, ‘/api/login_check’, [ ‘body’ => [ ‘username’ => ‘username’, ‘password’ => ‘secret123!#’…

LexikJWTAuthenticationBundle | JwtToken is working but Authentication says "Full authentication is required to access this resource."

My token login works fine, but if I try to know if I am fully logged in by my route: UserController.php /** * @Route(“/auth/me”, name=”userIsAuthenticated”) */ public function authenticated() { return new Response(‘:-)’, Response::HTTP_OK); } it just shows SymfonyComponentHttpKernelExceptionHttpException: Full…