Open Sogl opened 8 years ago
I second this question.
I had the same issue.. problem was different databases.. the Auth User table was being queried from the wrong setup
put this in config/api.php
'auth' => [ 'basic' => 'Dingo\Api\Auth\Provider\Basic' ],
@karandatwani92 @Sogl @bendparker
Hi guys, i've got the exact same problem. I've tried too this in my config/api.php but this isnt working.
I'm on Laravel 5.4 with latest Dingo. The middleware used for routes is like you api.auth
.
When i try to access to my route with postman, i select Basic Auth
and i enter login and password and this works, but, when i try to access my route from direct url in the browser like http://site.com/api/users
this gives me a (even if i logged on my site with another tab) :
Failed to authenticate because of bad credentials or an invalid authorization header
And if i try an internal request of this route, i've got the same error.
Do you find any solutions about this ? How did you proceed for your project ?
Best regards
Hi, same problem as @onim4ru. Someone please can help? Thanks
Hello!
In wiki: https://github.com/dingo/api/wiki/Authentication
I found that I need to put this code somewhere:
Also I found an issue with same problem: https://github.com/dingo/api/issues/694
My test route:
I tried to put in
App\Providers\AppServiceProvider.php
:Route call shows error:
Also tried to put in
config/api.php
this code:Error:
How to configure it?
Env: Laravel 5.3 Latest Dingo