tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.3k stars 1.54k forks source link

Using the middlewear does not work out fo the box #2032

Open Crysalist opened 4 years ago

Crysalist commented 4 years ago

Using the middlewear does not work out fo the box

When I installed the latest version the middlewear does not work out of the box with the header refresh tokens. The middle is setup as Route::group(['middleware' => ['jwt.auth','jwt.refresh']], function () { The only way I could get it to work was to remove the 'Bearer ' prefix in https://github.com/tymondesigns/jwt-auth/blob/develop/src/Http/Middleware/BaseMiddleware.php / handle the removal clienside.

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 7.25
Package version 1.0.0
PHP version 7.4.3

Steps to reproduce

Make new project with laravel. Install the latest jwt-auth. add a route with both the 'jwt.auth','jwt.refresh' on it to test. login get token calll route once. get the token in the header response and use that to call same route.

Expected behaviour

Should work with the Authorisation token from the header same as with /login

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.