codegreencreative / laravel-samlidp

Laravel SAML IdP
MIT License
232 stars 84 forks source link

1.0 Inputs not showing up in blade #137

Open parkerstafford opened 9 months ago

parkerstafford commented 9 months ago

Hidden inputs not being shown in the html of the blade file under @csrf when doing @samlidp.

upwebdesign commented 9 months ago

@parkerstafford, unfortunately there is not enough information to help guide you.

parkerstafford commented 9 months ago

hi there, that is about it. i followed the full steps setting up the configuration for the IDP, and in my blade file i put the @samlidp under the @crsf as stated in the documentation, and there is no hidden inputs. i did notice that there was a inputs blade file which i just took and put in there for now. i was also going to see what to put in the action attribute of the post form, a laravel route, or the SP url?

jfiguerm commented 9 months ago

It happens to me too, it adds the entry @samlidp in the login form but the hidden entries are not seen. Did you manage to solve it?

RafaAPMartins11 commented 8 months ago

The blade directive for this package is registered as bellow so the hidden inputs will only be present when SAMLRequest parameter is filled: https://domain.com/login?SAMLRequest=x

Blade::directive('samlidp', function ($expression) {
    return "<?php echo request()->filled('SAMLRequest') ? view('samlidp::components.input') : ''; ?>";
});