Jump to content

Amit

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Amit

  1. Hi, this is a question/feature request.  If the Shared Login plugin fails to validate the token, the page remains blank at 

    /plugin/shared_login/?t=1501259438&u=john%40customer.com&r=https%3A%2F%2Fexample.com%2Fclient%2Fplugin%2Fmyplugin%2Fclient_main%2F&h=4d49c89098eba2f70adccf4f1b8bffe4616263b09c06abd4470c24b820ddd656

    I intentionally broke the token to see the behavior.  Instead of staying at a blank page, it would be good if the plugin could just redirect to the given the redirect-url parameter.

    I made it work by updating plugins/shared_login/controllers/main.php 

    in index() method before "return false;" I added the redirect;

    ====

           if ($hash == $this->Companies->systemHash($time . $username . $uri, $key->value, 'sha256')
                && $time >= strtotime('-30 min')) {
                return $this->processSharedLogin($username, $uri);
            }

            $this->redirect($uri);

           return false;
    ====

     

    Alternatively maybe there could be an admin setting that defines what URL should be redirected to if there is an error.

×
×
  • Create New...