krisanalfa / lumen-jwt

Lumen with JWT Authentication, Dingo API and CORS Support
258 stars 80 forks source link

MethodNotAllowedHttpException in RoutesRequests.php line 598 #19

Closed ChaimaeELL closed 7 years ago

ChaimaeELL commented 7 years ago

i tray to route a route using my access-token but i got this exception Lumen 5.3 OAuth2

thanks you

krisanalfa commented 7 years ago

Which path you're accessing? Could you send a cURL command to reproduce this issue?

ChaimaeELL commented 7 years ago
$app->post('/oauth/token/refresh',['middleware' => 'auth','namespace' => 'Laravel\Passport\Http\Controllers', 'uses' => 'TransientTokenController@refresh']);
krisanalfa commented 7 years ago

How did you access that URL?

ChaimaeELL commented 7 years ago

i used postman to access to this url : http://localhost/OAuth/public/oauth/token/refresh with post method

krisanalfa commented 7 years ago

I understand. But which HTTP method?

ChaimaeELL commented 7 years ago

post method

abinasp commented 7 years ago

I think GET will work instead of POST, if you are using POST method you need to create a form with POST method in the view

krisanalfa commented 7 years ago

Refresh token accept PATCH method. Not POST. Try using PATCH and see if the problem still occurred.