I’m not sure what you prefer as repro, but this bit of PHP code can repro it great.
Code
<?php
// openssl genrsa -out keypair.pem 2048
$keypair = openssl_pkey_get_private(file_get_contents("keypair.pem"));
// Obtain the public key
$public = openssl_pkey_get_details($keypair)["key"];
// Build the query
$query = http_build_query([
"auth_redirect" => "https://localhost/redirect",
"application_name" => "Test repro",
"client_id" => "7624a5376b7f52eb403a",
"scopes" => "session_info",
"nonce" => bin2hex(random_bytes(16)),
"public_key" => $public
]);
$url = "https://forum.cfx.re/user-api-key/new?" . $query;
header("Location: " . $url);
The first and repeating authorization will succeed as the first user, when using it again for another user without changing the client_id it will fail.
![]()
User API keys are used for allowing the user to use their forum account in the game client, so they’ll be able to post from ingame. We also have lot of users using them to authenticate with forum accounts to their own websites.
Whereas the client ID should be unique for the game clients, so each client is listed as seperate client in the apps screen. For website usecase you’d want to have one client ID so not each login is listed separately.