Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel_token not generating when multiple guards #1036

Closed
MikeJones29 opened this issue Jul 3, 2019 · 1 comment
Closed

Laravel_token not generating when multiple guards #1036

MikeJones29 opened this issue Jul 3, 2019 · 1 comment

Comments

@MikeJones29
Copy link

MikeJones29 commented Jul 3, 2019

  • Passport Version: 7.3
  • Laravel Version: 5.8
  • PHP Version: 7.3.4
  • Database Driver & Version:
    Server version: 10.3.14-MariaDB-1:10.3.14

Description:

Issue is: Laravel_token is not generating when using consume own API
I mentioned more details on: https://stackoverflow.com/questions/56846006/laravel-passport-wont-create-laravel-token-and-then-error-401-unauthenticated-wi

But I believe there is an issue on this function:
protected function requestShouldReceiveFreshToken($request) { return $request->isMethod('GET') && $request->user($this->guard); }
in vendor\laravel\passport\src\Http\Middleware\CreateFreshToken.php line : 81
When consuming our API, there is no user, so it is clearly cannot create cookie, why it reaches to this line?

Steps To Reproduce:

Mentioned at
https://stackoverflow.com/questions/56846006/laravel-passport-wont-create-laravel-token-and-then-error-401-unauthenticated-wi

@driesvints
Copy link
Member

Multi-guard isn't supported atm. Please see #161 and #982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants