We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel Version: 5.8 Multiauth Version: 5
I get the error as mentioned above when attempting to hit a protected route when not logged in and authenticated.
For example, imagine one is not logged in and attempts to hit the route customers:
Route::group(['prefix' => 'v1/osf', 'middleware' => ['multiauth:customer,api']], function () { Route::get('customers', 'OpenShopFront\Customers\CustomerControllerr@index'); Route::get('customer/{id}', 'OpenShopFront\Customers\CustomerControllerr@show'); });
This will cause a 500 error stating "Error "Route [login] not defined".
I know when using passport you can use the Authenticate.php middleware and do something along the lines of:
<?php namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; class Authenticate extends Middleware { protected function redirectTo($request) { abort(response()->json([ 'status' => 'error', 'message_short' => 'Not Authenticated - Please Login', 'message_long' => null, 'validation_error' => null ], 401)); } }
How would something such as the above be achieved?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Laravel Version: 5.8
Multiauth Version: 5
I get the error as mentioned above when attempting to hit a protected route when not logged in and authenticated.
For example, imagine one is not logged in and attempts to hit the route customers:
This will cause a 500 error stating "Error "Route [login] not defined".
I know when using passport you can use the Authenticate.php middleware and do something along the lines of:
How would something such as the above be achieved?
The text was updated successfully, but these errors were encountered: