On SimpleSAMLphp SP errors the displayed error message is confronting for a non-technical user (which is most users).
Error messages occur even on semi-regular events. e.g. my IdP is ADFS based, and it covers users @example.com. If a user tries to login to that IdP as myemail@gmail.com then the IdP sends the SP back <samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Responder"/></samlp:Status> - "the request could not be performed due to an error on the part of the SAML responder or SAML authority" - and SimpleSAMLphp displays the attached error page.
Ideally I'd like to be able to display error messages like this Drupal side with the site theme that users are expecting.
Comments
Comment #2
George Bills commentedPatch attached that works my side. The patch provides a route for and method on SimplesamlphpAuthController that displays an error message. The method builds up a nice error message and calls a theme fn to output a template on the page. Drupal developers can override the template.twig.html or MYTHEME_preprocess_simplesamlphp_error to customise the displayed error. Instructions on how to implement the redirect back-to-Drupal SP side are included in the README.md.
Comment #3
George Bills commentedComment #4
nephinj commentedThis is what worked for me after flushing the cache.
Comment #5
nephinj commentedComment #6
nephinj commentedComment #7
nephinj commentedComment #8
varunity commentedI applied this patch and tested it as working.
Comment #9
pradeepjha commentedThis patch is not working with latest version 8.x-3.3.
Comment #10
absoludo commentedThis patch should work against 4.0.0.