The LexikJWTAuthenticationBundle provides authentication via Json Web Token for Symfony2+ REST API .
Questions tagged [lexikjwtauthbundle]
221 questions
23
votes
9 answers
Symfony4: Unable to find the controller for path "/api/login_check". The route is wrongly configured
I am tyring to set up symfony4 api JSON login by JWT.
The api platform core bundle is installed and I followed this instruction: https://api-platform.com/docs/core/jwt/
I created the custom user provider as described.
By opening the URL…

user3684098
- 349
- 1
- 3
- 18
13
votes
3 answers
Symfony PHPUnit - Inject dependency
I want to test this TokenProvider

Kevin
- 4,823
- 6
- 36
- 70
12
votes
3 answers
Error: Unable to find the controller for path "/login_check". The route is wrongly configured. (LexikJWTAuthentication)
Description
When I'm doing a normal request to my symfony server running on http://localhost:8000/api/admin/login_check it returns the desired jwt token.
However, when I do it with the functional tests (with ./bin/phpunit) I get the following…

kemicofa ghost
- 16,349
- 8
- 82
- 131
8
votes
3 answers
How to parse the jwt token from controller $jwtManager->decode($jwt) using pure token ( token as a string )
So I'm using Lexik JWT Authentication Bundle (Symfony 2.6) and successful created user and token using this code:
$userRegistration = new…

Pavel Kenarov
- 944
- 1
- 9
- 21
8
votes
3 answers
API Platform - Swagger UI with JWT Authentication
I'd like to add the "Authorize" button on Swagger, like described here : https://api-platform.com/docs/core/jwt#documenting-the-authentication-mechanism-with-swaggeropen-api
I installed LexikJWTAuthenticationBundle, it works fine with Curl. But when…

user9384432
- 81
- 1
- 3
7
votes
3 answers
Error system library:fopen:No such process
I'm starting to use this library https://github.com/lexik/LexikJWTAuthenticationBundle
When I use the command php bin/console lexik:jwt:generate-keypair, the console shows this error
In GenerateKeyPairCommand.php line 151:
error:02001003:system…

Turquito
- 97
- 1
- 1
- 5
7
votes
13 answers
401 JWT Token not found
I provided two versions of the security.yaml file. The second version according to API Platform documentation. API Platform sends to the creation a custom user provider. For the second option security.yaml recommended at API Platform docs, I need to…

Dmitry S.
- 3,766
- 3
- 18
- 26
7
votes
2 answers
LexikJWTAuthenticationBundle - There is no extension able to load the configuration for "api_login_check"
I'm trying to make some experiments with JWT and PHP, but I cannot make the LexikJWTAuthenticationBundle work.
I created a Symfony project using composer composer create-project symfony/skeleton my_project and install LexikJWTAuthenticationBundle…

Alan Alves de Oliveira
- 663
- 1
- 8
- 21
6
votes
1 answer
Using HWIOAuthBundle and LexikJWT at the same time
As the title suggests, I'm going to use Facebook,Google and GitHub authentication alongside JWT authenticator (LexikJWT).
Before starting, I want to know how can I use them? is it possible to use both of them to protect APIs?
If yes, what sort of…

Aien Saidi
- 159
- 7
- 25
6
votes
3 answers
Lexik JWT Token not found
I've seen similar questions but still can't get this to work.
I'm new with Symfony and I'm using Lexik JWT bundle with symfony3 for API authentication, and a login form for web authentication.
I get the token ok but when I try to use it I get 401 -…

NaryaV
- 98
- 1
- 6
6
votes
1 answer
Symfony 2 FOSUserBundle with rest login and registration
I have gone through lots of stackoveflow question and articles, but can't find a suitable answer.
I'm using fosuserbundle, hwiouthbundle and lexikjwt bundle.
I'm developing an api based on symfony which will be consumed by an android app and angular…

Ahmad Sajid
- 133
- 1
- 10
6
votes
3 answers
Lexik JWT returns 401 Unauthorized
I am using LexikJWTBundle for a RESTful API.
Login works just fine and I get my token. But when I make a GET request I get a 401 with no content.
The Authorization header seems ok since I get this in the profiler:
Request Headers: authorization:…

Xavier13
- 771
- 7
- 16
5
votes
2 answers
How to implement custom user provider for Lexik JWT authentication?
I try to implement LexikJWT authentication to my symfony/mongodb project, I succeeded to authenticate through a static users (in_memory), but I have no idea how to exploit it with my own user class, here's my code-lines:
Security.yml
security:
…

Wajdi Ben Abdallah
- 297
- 1
- 4
- 18
5
votes
2 answers
Symfony JWT token: exception when token is expired
I am using JWT Token Bundle for user authentication. When the token is expired I get 500 server error. Instead of this how can I return JsonResponse with error code and message?
Here is my authenticator class:
class JwtTokenAuthentication extends…

blahblah
- 1,010
- 15
- 40
5
votes
2 answers
Deploy Symfony app with LexikJWTAuthenticationBundle on Heroku
I have my app deployed to Heroku, then I added an api with LexikJWTAuthenticationBundle for authentication. I created public and private keys with a passphrase like the documentation says, and it works great on my local machine, yet I do not know…

John Armstrong
- 236
- 2
- 5