Skip to content

Multiple auth providers and dingo #1767

@prasanthsd

Description

@prasanthsd
Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 8.x
Package version 3.x.x
PHP version

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());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions