Hello
I'm not sure to understand how to request a JWT token :
-Do we need to call the endpoints user/login before call /jwt/token ?
- So what we need to set after user/login, the cookie ?
Why is not possible to send directly credential in basic auth parameter on /jwt/token ? as mentionned here https://dev.acquia.com/blog/decoupled-drupal-authentication-json-web-tokens
As a logged-in user, or when you issue a GET request against /jwt/token with credentials of a user with the appropriate permissions, you will receive a token like that seen below, with which we can issue authenticated requests to Drupal.
so it should be ?
Do you discorourage to install this module https://www.drupal.org/project/getjwtonlogin ? ( this module provide directly the jwt token on user/login )
Comments
Comment #2
musa.thomasComment #3
musa.thomasComment #4
adamtyoung commentedI also have the same question. How does one simply get the JWT token using a JS library?
Comment #5
pwolanin commentedYou can use that linked module, or participate in this issue which suggests pulling that functionality into the main jwt module:
#2957273: Get the token bearer with the JWT module after log in rest method
Comment #6
pwolanin commented