dingo / dingo/api

Multiple auth providers and dingo

Open
#1,767 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

| Q | A
| ----------------- | ---
| Bug? | yes
| New Feature? | no
| Framework | Laravel
| Framework version | 8.x
| Package version | 3.x.x
| PHP version | |74

#### Actual Behaviour

I have created multiple guards and providers in auth.php. I have User model and AdminUser model. I can actually login and generate JWT token in both cases. But then problem is in my auth middleware where I try to check if the user is authenticated. The below code (It resides inside a middleware) always checks the default Users model and not the admin users model. Is there any way to fix it?

`$this->auth->authenticate($route->getAuthenticationProviders());`

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.