code: public function getAutoLoginUrl(
          array $autoUrl,
          array $redirectUrl = null,
          string $expireInterval = '1 day',
          bool $addRememberMeCookie = true
      ): string {
          $autoUrl['?']['t'] = $this->generateLoginToken(
              $redirectUrl,
              $expireInterval,
              $addRememberMeCookie
          );
          $url = Router::url($autoUrl, true);
          $urlLength = strlen($url);
          if (strlen($url) > 2080) {
              throw new \Exception('Generated url "' . $url . '" is too long');
          }
  
          return $url;
      }
docs: Returns a full auto login url with token.
  
  @param array      $autoUrl             URL configuration pointing to auto login page
  @param array|null $redirectUrl         Optional redirect url
  @param string     $expireInterval      When this token expires
  @param bool       $addRememberMeCookie Enabling setting the remember me cookie on auto login
  @return string
  @throws \Exception If the generated URL is too long for browsers