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

George Bills created an issue. See original summary.

George Bills’s picture

Patch 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.

George Bills’s picture

Status: Active » Needs review
nephinj’s picture

This is what worked for me after flushing the cache.

nephinj’s picture

StatusFileSize
new7.49 KB
nephinj’s picture

nephinj’s picture

varunity’s picture

Status: Needs review » Reviewed & tested by the community

I applied this patch and tested it as working.

pradeepjha’s picture

Status: Reviewed & tested by the community » Needs work

This patch is not working with latest version 8.x-3.3.

absoludo’s picture

This patch should work against 4.0.0.