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
Http 502 config guard sanctum #117
Comments
Hey there, Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue. Thanks! |
I have this exact same issue. It took me a few hours to figure it out. I fixed it by setting The problem was that i configured A simple improvement idea for sanctum is to check and skip the guard if it's using the sanctum guard (just before line 57). if (config("auth.guards.$guard.driver") == "sanctum") {
continue;
} I'm glad to know that i'm not the only one making this mistake. @sturn and this stackoverflow user did the exact same mistake setting the sanctum.guard to the same sanctum guard. |
just got into this problem today, if it gets too common I think its worth a note or some improvement into the framework |
Facing the same issue. Sanctum Guard is web, the guard on the route is auth:sanctum and the config/auth.php is using the default web guard. |
same here problem here, solved setting it to null |
Description:
Http 502
Steps To Reproduce:
config\sanctum.php
'guard' => 'sanctum',
middleware
Route::middleware('auth:sanctum')->get('/test', function (Request $request) { return []; });
I think
Compatibility Code
sanctum/src/Guard.php
demo
The text was updated successfully, but these errors were encountered: