Questions tagged [lexikjwtauthbundle]

The LexikJWTAuthenticationBundle provides authentication via Json Web Token for Symfony2+ REST API .

221 questions
0
votes
2 answers

Lexic/JWTAuthenticationBundle - cannot submit token via query parameter

I am trying to upgrade the Lexic/JWTAuthenticationBundle from version 1.7 to 2.14. (This is in support of our upgrade of the Symfony bundle from version 3 to 4, and eventually 5). Some of our code makes API queries with the token as a query…
0
votes
4 answers

Lexik JWT authentication problem "Invalid credentials"

I am new to symfony and I am using LexikJWTAuthenticationBundle for authorization. I am using symfony 6.0.2 and 2.14 lexic version. I am using Postgresql 12.9. My security.yaml: security: enable_authenticator_manager: true #…
Azamat
  • 1
  • 1
  • 2
0
votes
0 answers

Why Symfony $tokenstorage is empty after JWT Authentication

I get no current User by requests from websocket to symfony backend. i authenticate my User through route /authapi/v1/applogin manual with following: if($passwordEncoder->isPasswordValid($user, $content->password)){ $token = new…
Daniel Richter
  • 768
  • 5
  • 23
0
votes
0 answers

How can I store data of decode JWT in nuxt?

I have pages with connexion and deconnexion to login on my nuxt app. I use Symfony for the back and the librairy JWT for token authentification. Here this is the code auth.js called when an user is login on my app. This works but I would like to…
chtouk
  • 303
  • 4
  • 13
0
votes
2 answers

Symfony 5.3: LexikJWT: Unable to find the controller for path "/api/login_check". The route is wrongly configured

On localhost the app works perfectly, but when I put it on the apache server, I get this error: "Unable to find the controller for path "/api/login_check". The route is wrongly configured." Security.yaml: firewalls: dev: pattern:…
0
votes
2 answers

Can't get Lexik JWT token from other domain

Symfony 4 I made a lexik jwt autorization by instruction: https://h-benkachoud.medium.com/symfony-rest-api-without-fosrestbundle-using-jwt-authentication-part-2-be394d0924dd It works fine from postman or console curl. When I try to get token by ajax…
Den
  • 19
  • 1
  • 6
0
votes
1 answer

UniqueConstraint for JWT token - how to?

My enviroment: lexik_jwt_authentication: user_identity_field: phoneNumber security: providers: chain_provider: chain: providers: ['fos_userbundle', 'app_user_provider'] fos_userbundle: …
0
votes
1 answer

Concurrent requests for Symfony4 REST API (LexikJWTAuthenticationBundle)

I'm a bit lost right now and could use a push in the right direction. In short PHP Symfony 4 project (mostly default configuration), hosted on Google Cloud App Engine REST API, authentication via LexikJWTAuthenticationBundle Requests need to pass…
0
votes
1 answer

Multiples firewalls with same pattern

I currently have the following configuration, Endpoints /api work fine when sending token from external consumers. But I now want to reuse this pattern ^/api, with ajax in my application that is using sessions. How can I configure the firewall to…
Carlos 2V
  • 129
  • 1
  • 7
0
votes
0 answers

Getting anon when trying to get loogged in user [Symfony 3.4] FOSUserBundke+Lexik+FosRest

I'm new in symfony and tried to implement a auth service that allows me to register+login+getting the logged in user for my angular app. the login worked like a charm, got the token and connected successfully to the app, but when I tried to get the…
0
votes
1 answer

LexikJWTAuthenticationBundle with multiple provider

I'm using LexikJWTAuthenticationBundle with Api-Platform. I have multiple provider like this : providers: app_user_provider: entity: class: App\Entity\User property: email app_candidat_provider: …
Nuxilius
  • 13
  • 2
0
votes
1 answer

Symfony 4 JWT - Auth works only if i reset password

first time here. I'm using LexikJWTBundle in a Symfony 4 API. I created a Symfony command that at some point creates users. Now, authentication works just fine on my local web server. But on production server, i got a {"code":401,"message":"Invalid…
0
votes
1 answer

Can't genrate RSA private key with LexikJWTAuthenticationBundle

I'm using this library and following it's documentation. In the "Generate the SSH keys" section it's mentioned that I must execute these commands: mkdir -p config/jwt openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt…
0
votes
1 answer

How to solve Lexit JWT 401 Error "Authentication request could not be processed due to a system problem" on Symfony 5.1.5

I'm new to Symfony and running into a problem I can't solve on my own. I've built a pretty basic website, and exposed a basic API with API Platform. I wanted to try and build an SPA (as described in Symfony : The Fast Track), and add an…
Nix D.
  • 1
  • 1
0
votes
1 answer

Code 401 Invalid JWT Token after login on Siteground

I have this problem only in production, on Siteground (that use Nginx). The project is divided as follows: rest: symfony front: angular When i login (call login_check.json) receive correctly the token, after makes a call to a route that requires…
Nobady
  • 1,074
  • 2
  • 11
  • 35