Resource icon

[TH] OAuth Integration 1.0.1

No permission to download
where do I add the OAuth2 client credentials to my other site?
It would depend entirely on what the other site is, we wouldn't be able to know where to enter the settings in every other site that exists. You would enter them during the setup process of whatever it is you need the OAuth client for. Unless I'm misunderstanding what you're asking or trying to do?
 
It would depend entirely on what the other site is, we wouldn't be able to know where to enter the settings in every other site that exists. You would enter them during the setup process of whatever it is you need the OAuth client for.
Ok I am using Xenforo 2.2.12 on my other site and do I enter it in OAuth client
 
When trying to install:

Code:
TypeError: openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given in src\addons\Audentio\API\Setup.php at line 283
openssl_pkey_get_details() in src\addons\Audentio\API\Setup.php at line 283
Audentio\API\Setup->generateDefaultOptionValues() in src\addons\Audentio\API\Setup.php at line 121
Audentio\API\Setup->postInstall() in src\XF\AddOn\AddOn.php at line 544
XF\AddOn\AddOn->postInstall() in src\XF\Admin\Controller\AddOn.php at line 771
XF\Admin\Controller\AddOn->actionFinalize() in src\XF\Mvc\Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src\XF\Mvc\Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src\XF\App.php at line 2483
XF\App->run() in src\XF.php at line 524
XF::runApp() in admin.php at line 13
 
I'm my host. As far as the php logs go, there's nothing. Does it maybe return false because I'm running via IIS?

1682785509674.png

There are some reports about that, albeit being ancient.

 
Last edited:
It might be because you’re running on Windows. There’s a comment about a config file path needing to be passed in on Windows, we probably don’t support Windows edge cases like this (I didn’t think Windows itself even officially supported PHP any more).
 
That's strange, because, according to phpinfo, OpenSSL is working just fine:
1682786315351.png

Update:
Found the "fix". C:\Program Files\Common Files\SSL\openssl.cnf did not exist. So I copied over PHPs openssl.cnf and it installed.
 
No idea, just going by what the comment says on php.net there. I don't have any Windows machines to test with.

Create a test PHP file and put this in it:

PHP:
<?php

$configargs = array(
  "config" => "/path/to/openssl.cnf",
  'private_key_bits'=> 2048,
);

// Create the keypair
$res=openssl_pkey_new($configargs);

var_dump($res);

Change /path/to/openssl.cnf to the path from your phpinfo there, then run it in your browser, what does it output?
 
Thanks for your swift responses.

I'm now running in the following error:
Code:
ErrorException: [E_USER_NOTICE] Key file "file://D:\inetpub\php\temp/*CLIENT ID*.key" permissions are not correct, recommend changing to 600 or 660 instead of 666 src\addons\Audentio\API\vendor\league\oauth2-server\src\CryptKey.php:63

This is most likely because of windows permissions not working as well with thephpleague's OAuth 2 server:

Is there any way this could be remedied on your side, for example with the ability to pass false to $keyPermissionsCheck?

For a quick fix I've simply gone ahead and set it to false in the vendor files, myself.

Also: Is there any more documentation about this? For example an overview about the routed urls used for oauth2? I've gone ahead and skimmed the code a bit for the following results:
Authorization endpoint: /audapi/oauth2/authorize
Token endpoint: /api/audapi-oauth2/token (a bit inconsistent... would have guessed /audapi/oauth2/token

But what is, for example, the user info endpoint? What are the claims that are being returned? Is there any documentation about that? Because it doesn't seem to return any claims at all (let alone claims that I could identify the user with).
 
Last edited:
But what is, for example, the user info endpoint? What are the claims that are being returned? Is there any documentation about that? Because it doesn't seem to return any claims at all (let alone claims that I could identify the user with).

The addon doesn’t add any additional endpoints other than the ones for authenticating the user. Once you have an access token you can access the default XF api as that user the same as if you had generated an API key for the user. Just use bearer / token authentication
 
Any chance of getting this working with Xenforo Cloud? Right now it won't let me install it.

"Could not process Audentio-API-1.0.1.zip: The add-on 'OAuth Integration 1.0.1' may not be compatible with XenForo Cloud: An unexpected response was received. Please try again later."
 
Is this when installing via the ACP? Can you open the zip archive on your computer? It depends at which stage of installing you see that as to what may be wrong. You may need to ask the XF Cloud team for more info on what's causing that, as far as I'm aware there's nothing different about this addon compared to any other but we're not familiar with any Cloud-specific restrictions or checks that might be carried out. I imagine it'll be something to do with the key generation or something if there is an incompatibility.
 
Add-ons may be reviewed before being approved for Cloud installations.

I have the ticket and will respond once I have checked it over.
 
Also is it possible to confirm what the token url is,
Code:
/api/audapi-oauth2/token
isn't working for me as suggested earlier
 
Top Bottom