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

\Auth::user() always null when request or refresh token to oauth/token, is it a bug? #784

Closed
ratno opened this issue Jul 31, 2018 · 1 comment

Comments

@ratno
Copy link

ratno commented Jul 31, 2018

I try to log request access to API including request new token and refresh token to oauth/token, but my log always record null for \Auth::user(), so i create fresh new laravel passport just to test this access log, but the result is still null, here is my trial settings: https://github.com/ratno/trial_passport

so i create LogAccess middleware just to log user who request token:
screen shot 2018-07-31 at 23 36 47

then run artisan command to simulate request token and refresh token:
screen shot 2018-07-31 at 23 38 35

here is my laravel.log, i cant get user id who request the token:
screen shot 2018-07-31 at 23 41 38

is this the expected behaviour or a bug?

@ratno
Copy link
Author

ratno commented Aug 3, 2018

Solved, but not directly though, by adding extra meta data: #94

@ratno ratno closed this as completed Aug 3, 2018
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

1 participant