The LexikJWTAuthenticationBundle provides authentication via Json Web Token for Symfony2+ REST API .
Questions tagged [lexikjwtauthbundle]
221 questions
1
vote
0 answers
Symfony 5.4, When I want to recover my token (To recover the user) via the token_storage my return value is null
I'm using Symfony 5.4, I use LexikJWTAuthenticationBundle to generate my tokens. For the /login_check part, everything is fine but I have a /me route to retrieve users via their token that doesn't work. My token is well in the header of the request…

IDK
- 11
- 1
1
vote
1 answer
Symfony 6 - JWTRefreshTokenBundle - "Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken" is not a valid entity or mapped super class
I am installing JWTRefreshTokenBundle on a Symfony 6 and PHP 8.1 base
I followed the documentation and I get the following error:
Class "AppEntityRefreshToken" sub class of "Gesdinet\JWTRefreshTokenBundleEntityRefreshToken" is not a valid entity or…

GoldoKnack
- 25
- 7
1
vote
0 answers
Issue with log in in symfony 6
I have next code:
security.yaml
security:
enable_authenticator_manager: true
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
providers:
app_user_provider:
entity:
class:…

Vladislav Pisarev
- 19
- 2
1
vote
0 answers
How is proper the way to make Impersonation for API Backend with Symfony?
I have an API Backend as a central user repository use Symfony, Api bundle, LexikJWTAuthenticationBundle, and JWTRefreshTokenBundle, suppose we name it User Backend.
Every other backend system that I have will connect to the User Backend and…

khgasd652k
- 281
- 1
- 9
1
vote
2 answers
Symfony api platform ignore jwt token
Iam creating symfony api (api platform) with jwt (LexikJWTAuthenticationBundle)
Login works great. I added this into security.yaml
login:
pattern: ^/api/login
stateless: true
json_login:
check_path:…

Nitram Nekonečný
- 49
- 1
- 4
1
vote
0 answers
Symfony with custom authenticator: error occur: Request body is empty
Symfony 5.4,
api-platform 2.6
I tried to follow the Extending Authenticator example from Github (https://github.com/lexik/LexikJWTAuthenticationBundle/blob/2.x/Resources/doc/6-extending-jwt-authenticator.md#extending-authenticator), but now I got…

bluemoonJ
- 11
- 2
1
vote
0 answers
Symfony 6 JWT with lexikjwtauthbundle /api/login_check request return 404 on localhost
I am trying JWT bundle lexik/jwt-authentication-bundle for authentication on localhost.
It is new project in symfony 6.
I am trying call the route via curl but I have got 404 error Not found.
I follow the…

dodo
- 159
- 7
1
vote
0 answers
lexikJWTAuthentication bundle Extending authenticator Call to a member function extract() on null when
Im using lexikJWTAuthenticationbundle to make a JWT authentication in my webservice. Everything works good but I want to override the authenticator to add further control especially controlling if the token sent to mee and its informations: header,…

Kaan Maraz
- 11
- 2
1
vote
1 answer
LexikJWTAuthenticationBundle return user AND token
I use api plateform, i have install LexikJWTAuthenticationBundle for my authentification.
my file security.yaml
security:
encoders:
App\Entity\User:
algorithm: auto
providers:
app_user_provider:
…

ThomasM
- 67
- 1
- 6
1
vote
0 answers
Symfony 5.3 : Assign User to Object with JWT
I'm working with Api-platform and I tried to inject my user authenticated in object, for a post request.
My problem is, when send my user in object:
obj->setUser($this->security->getUser());
I need a password and I have a error:
An exception…

M_K
- 11
- 3
1
vote
1 answer
Unrecognized option "lexik_jwt" under "security.firewalls.api"
I'm getting this error during the running of DB migrations. It was working fine until recently. The issue is started with failing the DB migrations in our QA servers when running pipelines. When I looked within the migration container, there was…

chamindaindika
- 455
- 3
- 15
1
vote
1 answer
/api/login_check return 404 not found
I am trying to put my website on production.
For the authentification, I pass by the LexikJWTAuthenticationBundle.
I want to run my website on a Apache server.
Passing by Apache when I run this command:
curl -X POST -H "Content-Type:…

Cantinou
- 126
- 5
- 21
1
vote
0 answers
is it possible to secure the urls of my api in addition to jwt so that only my mobile application can access them?
I am using symfony 5 and LexikJWTAuthenticationBundle to authenticate users. everything works and I receive the token but I would like to ensure that only my mobile application can access the API. is it possible to secure the api with a key or a…

ventomachine45
- 9
- 1
1
vote
0 answers
Configuring api-platform to include header in OpenAPI (AKA Swagger) documentation
I am using API-Platform with JWTs and have created a decorator to allow Swagger to display a /authentication_token endpoint as described by https://api-platform.com/docs/core/jwt/ and to a lesser degree https://api-platform.com/docs/core/openapi/. …

user1032531
- 24,767
- 68
- 217
- 387
1
vote
0 answers
Error security.firewalls.access_control symfony
Hello i have this error :
Unrecognized options "0, 1" under "security.firewalls.access_control".
Available options are "access_denied_handler", "access_denied_url",
"anonymous", "context", "custom_authenticators", "entry_point",
"form_login",…

khyshant
- 11
- 2