Replies: 8 comments
-
|
Have you cleared your route cache? |
Beta Was this translation helpful? Give feedback.
-
|
@lrljoe yes, doesn't work. It works after changing the routeMacro: protected function registerPasskeyRouteMacro(): self
{
Route::macro('passkeys', function (string $prefix = 'passkeys') {
Route::prefix($prefix)->group(function () {
Route::get(
'authentication-options',
[GeneratePasskeyAuthenticationOptionsController::class, '__invoke']
)->name('passkeys.authentication_options');
Route::post(
'authenticate',
[AuthenticateUsingPasskeyController::class, '__invoke']
)->name('passkeys.login');
});
});
return $this;
} |
Beta Was this translation helpful? Give feedback.
-
|
Hmm, what did you change other than the "__invoke" call (which shouldn't be needed - as Laravel automatically calls __invoke if not specified) |
Beta Was this translation helpful? Give feedback.
-
|
PR #30 opened for this |
Beta Was this translation helpful? Give feedback.
-
|
havent changed anything other than adding the invoke. |
Beta Was this translation helpful? Give feedback.
-
|
Cool, I've added a PR that forces it to use the __invoke method, I imagine it'll get reviewed next week. Weirdly, it behaves perfectly fine on my test instance. |
Beta Was this translation helpful? Give feedback.
-
|
@sweebee Could you try it our test app: https://github.com/spatie/laravel-passkeys-app Does it work there for you? |
Beta Was this translation helpful? Give feedback.
-
|
I found the issue. I still had a namespace in my RouteServiceProvider (probably from an early version of Laravel). after removing it it works! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Added routes dont work:
How to reproduce the bug
Added
Route::passkeys();to web.phpPackage Version
1.0
PHP Version
8.4
Laravel Version
12
Which operating systems does with happen with?
macOS
Notes
No response
Beta Was this translation helpful? Give feedback.
All reactions