BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Route method not allowed on saml/acs post

Open Jazb opened this issue 6 years ago • 4 comments

When the request from SAML Google provider pass to saml/acs endpint, I am received an error with The POST method is not supported for this route. Supported methods: GET, HEAD. Found on Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException.

The instance of bookstack has been updated from old version follow the instructions of documentation.

I am executed follow commands:

git pull origin release && composer install && php artisan migrate php artisan cache:clear && php artisan config:clear && php artisan view:clear php artisan bookstack:regenerate-permissions php artisan bookstack:regenerate-search php artisan optimize:clear

chown $user: -R . # To fix perm

At list the route from artisa, saml/acs allowed post:

php artisan route:list | grep saml

Jazb avatar Feb 19 '20 03:02 Jazb

Hi @Jazb,

My guess is that google is not redirecting you to the correct endpoint. Are you familiar with using browser developer tools at all?

If so, you could open the "Network" tab and ensure the redirect from Google is sending you to the correct endpoint with the correct method.

Also, Just to be sure, Are you using /saml2/acs? since your post states /saml/acs...

ssddanbrown avatar Feb 19 '20 14:02 ssddanbrown

Here I attached the error, I saw through the network that the post is correct goes to the appropriate endpoint and in addition to this in the log of the nginx it looks like the same path is correct.

https://flareapp.io/share/xmN0xb70

This is the error itself, any other possibility that I can explore?

Jazb avatar Feb 20 '20 03:02 Jazb

Hi @Jazb, Apologies for this, It looks like I've mis-typed this in the documentation. The endpoint should be /saml2/acs instead of /saml2/asc.

I've labelled this to remind myself to update the docs when I next can do so.

ssddanbrown avatar Feb 20 '20 09:02 ssddanbrown

Docs now updated so I'll close this. If you continue to have issues feel free to open a new issue referencing this one.

ssddanbrown avatar Feb 20 '20 22:02 ssddanbrown