Skip to content

Use middleware 'auth:api' and 'client' simultanaous #898

Closed
@jcharcosset

Description

@jcharcosset

I use Laravel 5.7.* and Passport ^7.0 .

To consume my API with javaScript, I added CreateFreshApiToken middleware.
I would also like to implement Client Credentials Grant Tokens authentication so that a machine can use the API.

But, the two middlewares "client" and "auth:api" doesn't work together.

If I put "auth:api" middleware only, I can't access my API from web. And reciprocally, if I put "client" middleware only, I can't access my API from another machine.

Best regards,

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