Invalid redirect



  • It has been a year since I first complained about getting this error. I am wondering if there have been any revelations since that time? I have switched over from using my laptop with ngrok to using EC2. I am getting the same exact error (from the same code). Just as a reminder, I am sending the passwordless email to a user. When they click on it they get this popup from fusionAuth.

    {
    "error" : "invalid_request",
    "error_description" : "Invalid redirect uri https://researchstudyonline.com:81/index.php/Configure/report_generator_amazing",
    "error_reason" : "invalid_redirect_uri"
    }

    Is there anyway to see what is causing this error?



  • And here is the code that causes that:

            $request["applicationId"] = $_SESSION['applicationID_login'];
    
            $request["loginId"] = $email;
            $request["state"]["redirect_uri"] = "http://researchstudyonline.com:81/index.php/Configure/report_generator_amazing";
            // $request["state"]["client_id"] = $_SESSION['applicationID_admin_register_login'];
            $request["state"]["client_id"] = $_SESSION['applicationID_login'];
            $request["state"]["response_type"] = "code";
            $request["state"]["scope"] = "openid";
            $request["state"]["state"] = "$email";
            $requestJ = json_encode($request);   //convert the array into json
            $result = $_SESSION['client']->withTenantId($_SESSION['tenantID_login'])->startPasswordlesslogin($requestJ);
            if (!$result->wasSuccessful()) {
                log_message('error', $result);
            }
    
            $code = $result->successResponse->code;
            //send the email
            $request = array();
            $request["code"] = $code;
            $request["X-FusionAuth-TenantId"]=$_SESSION['tenantID_login'];
            $request["user"]["data"]["admin_email"] = $email;
            $requestJ = json_encode($request);   //convert the array into json
            $result = $_SESSION['client']->sendPasswordlessCode($requestJ);
            if (!$result->wasSuccessful()) {
                log_message('error', $result);
            }
    

    Are there any error messages in a log?



  • This post is deleted!

Log in to reply