BinarCode / laravel-restify

The fastest way to make a powerful JSON:API compatible Rest API with Laravel.
https://restify.binarcode.com
MIT License
604 stars 54 forks source link

RestifyJs can only be accessed if authenticated. #593

Closed rizkyseptiawan closed 11 months ago

rizkyseptiawan commented 1 year ago

I tried using restifyjs, but the restify.api.restifyjs.setup route is only accessible if authenticated. It shouldn't be like that. After I did some checking. I am using auth:sanctum as middleware. It looks like the problem is there. Because there is no 'auth:sanctum' in withoutMiddleware.

src/Bootstrap/RoutesDefinition.php

    public function once(): void
    {
        ...............

        // RestifyJS
        Route::get('/restifyjs/setup', RestifyJsSetupController::class)->withoutMiddleware(
            RestifySanctumAuthenticate::class,
        )->name('restifyjs.setup');
    }
binaryk commented 11 months ago

Fixed https://github.com/BinarCode/laravel-restify/releases/tag/8.3.2