laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.

Home Page:https://laravel.com/docs/passport

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error Method Laravel\Passport\Guards\TokenGuard::attempt does not exist When using 'api' guard

Mohdk911 opened this issue · comments

Passport Version

11.8.8

Laravel Version

10.19.0

PHP Version

8.1.22

Database Driver & Version

MySQL 8.0.34, SQLite 3

Description

Error Method Laravel\Passport\Guards\TokenGuard::attempt does not exist when use Passport::actingAs with 'api' guard when do login user via Auth::attempt()

Steps To Reproduce

Error Method Laravel\Passport\Guards\TokenGuard::attempt does not exist when use Passport::actingAs with 'api' guard when do login user via Auth::attempt()


Hi there,

Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

@crynobone
But it seems that it's a bug with the library it self since it's working with guard 'web' but it's not working with guard 'api'

What you describe is the expected behaviour, you can learn more by asking in any support channels as suggested.