Jump to content

Recommended Posts

Questions should be clear and concise, leaving 0 margin for doubt.

 

The reason you are getting no response is:  No One Knows What You Are Talking About!

 

1. Brief statement of what you are desiring to do.

2. Any code that is relative to the problem.

3. How the output is different than what is desired.

 

Follow those steps, and you will get replies.

Link to comment
https://forums.phpfreaks.com/topic/260463-fatal-error/#findComment-1335026
Share on other sites

Using this oAuth library https://github.com/elbunce/oauth2-php

Running authorize.php and clicking "yep" button

System is returning Fatal error: Uncaught {"error":"invalid_client","error_description":"No client id supplied"} thrown in A:\public\lib\OAuth2.php on line 837

Reason it is returning that and not doing as it should is because line ~830+

	if (!isset($inputData)) {
		$inputData = $_GET;
	}
	$input = filter_var_array($inputData, $filters);

is returning no value.

 

If you manually set values (on line 835+)


	$input["client_id"] = "0123456789ab";
	$input["redirect_uri"] = "http://www.google.com.au";
	$input["response_type"] = "code";

it works as it should.

 

Hope this now makes senese :)

Link to comment
https://forums.phpfreaks.com/topic/260463-fatal-error/#findComment-1335029
Share on other sites

  • 9 months later...

I had the same problem.

The problem is that in authorize.php starting on line 53, it is listed

 

<form method="post" action="authorize.php">
<?php
print_r($auth_params);
foreach ($auth_params as $key => $value) : ?>
<input type="hidden"
name="<?php htmlspecialchars($key, ENT_QUOTES); ?>"
value="<?php echo htmlspecialchars($value, ENT_QUOTES); ?>" />
<?php endforeach; ?>
Do you authorize the app to do its thing?
<p><input type="submit" name="accept" value="Yep" /> <input
type="submit" name="accept" value="Nope" /></p>
</form>

 

And

name="<?php htmlspecialchars($key, ENT_QUOTES); ?>"

is missing echo, so it should be:

name="<?php echo htmlspecialchars($key, ENT_QUOTES); ?>"

and then the values do get passed and it works out.

Edited by amoxibos
Link to comment
https://forums.phpfreaks.com/topic/260463-fatal-error/#findComment-1410019
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.