InvalidCredentialsException when getting access token via POST
- Dominant language
- PHP
- Stars
- 399
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
**Steps to Reproduce**
1. Install & configure Larapi
2. Send a postman request to get the access_token
```
php artisan serve
curl -X POST http://localhost:8000/login -H 'Content-Type:application/json' -d '
{
"email":"esben@esben.dk",
"password":"1234"
}'
```
**Expected Result:**
- The access_token should be returned as response
**Actual Result:**
- `Infrastructure\\Auth\\Exceptions\\InvalidCredentialsException` is thrown in `infrastructure/Auth/LoginProxy.php:85`
**Root Cause**
- `$this->apiConsumer->post('/oauth/token', $data);` throws an internal Server error in `infrastructure/Auth/LoginProxy.php`
- `Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated.`
**Resolution**
- `composer require lcobucci/jwt=3.3.3`
- `laravel/passport` uses `thephpleague/oauth2-server` which uses `lcobucci/jwt "3.3.3"`.
Contributor guide
Assessment
This issue has not been assessed yet.