sfelix-martins / passport-multiauth

Add support to multi-authentication to Laravel Passport
MIT License
288 stars 51 forks source link

provider validate error can response json format #102

Closed reymondkao closed 5 years ago

reymondkao commented 5 years ago

How to setup provider validate error can response json format. please, I need

500Internal Server Error

The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.

sfelix-martins commented 5 years ago

Make sure you are passing the parameter provider like explained here

reymondkao commented 5 years ago

Thank you~ I understand, but others people don't know

{ "username":"user@domain.com", "password":"password", "grant_type" : "password", "client_id": "client-id", "client_secret" : "client-secret", "provider" : "admins" }

Only the provider parameter response to 500

AddCustomProvider class can add try throw

try {

} catch (OAuthServerException $e) { throw new AuthenticationException; }

please, I need... need

sfelix-martins commented 5 years ago

Please, send a pull request to be checked. For now you can fork the project and use from your fork. More instructions here.