I have an extension that uses a 3rd party authentication system for EE3. It's working great overriding login_authenticate_start but I'm stuck on some logic for when the 3rd party auth fails: how to fail gracefully?

I know in this function I can exit() to stop the login, but it's not pretty. If you just exit() you get a white page.

How do I reject the login gracefully (i.e. back to the login page) and provide my own text for the explanation text? (much like when you fail a login normally as depicted below)

failed login example


Have you tried this? This is how EE passes messages to a redirect. https://docs.expressionengine.com/latest/development/legacy/libraries/session.html#flash-data-for-redirects

  • That's likely relevant however this seems to be helpful for passing data between pages that you control. The login page isn't part of my extension, I'm just taking over one step in the process. – Jimmy Mooney Mar 28 '17 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.