From 62b7305570ec7d433f641e6888bad5ec2c2a6d33 Mon Sep 17 00:00:00 2001 From: William Daza Date: Fri, 24 May 2019 18:24:36 -0500 Subject: [PATCH] it sends by default the provider users, in case of not sending the provider in the request of the oauth token, to avoid the error (The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed .) --- src/Http/Middleware/AddCustomProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Middleware/AddCustomProvider.php b/src/Http/Middleware/AddCustomProvider.php index a77ab31..b2f69eb 100644 --- a/src/Http/Middleware/AddCustomProvider.php +++ b/src/Http/Middleware/AddCustomProvider.php @@ -32,7 +32,7 @@ public function handle(Request $request, Closure $next) { $this->defaultApiProvider = config('auth.guards.api.provider'); - $provider = $request->get('provider'); + $provider = $request->get('provider', 'users'); if ($this->invalidProvider($provider)) { throw OAuthServerException::invalidRequest('provider');