dingo / dingo/api

Help me please with basic auth

Open
#1,634 1 comment 0 reactions 1 assignee Claimed by @specialtactics View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Hi everyone!

I'm sorry for this popular question but I can't configure basic auth for my API.
I've putted this code into by AppServiceProvider:

```
app('Dingo\Api\Auth\Auth')->extend('basic', function ($app) {
return new Dingo\Api\Auth\Provider\Basic($app['auth'], 'email');
});
```

But I got 401 message that client couldn't be authorized.
At the same time, I'm authorized in my admin panel via cookie and laravel session.
I also send X-CSRF-TOKEN in my headers but I still get 401 error.

Help me, please. I think I have a misunderstanding with some basic knowledge.

Sincerely, Dmitry

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.