I'd like to populate the users tables immediately instead of call to the handshake form. All users funnel via portal, using CodeIgniter. Single Sign on for that is working great, but want to lose that inbetween step of users having to complete the new account/link account form. Thanks for the plugin.
I'll look into this, maybe a config file switch. Unfortunately, if the account isn't able to be created for whatever reason, it will probably just fail silently. We'll see.
The ProxyConnect source is not currently version controlled in a public repository, so the only way to do this is to email me your changes with a description of what they are and why you want/need them.
Hi Everybody, Here is my change on ProxyConnect to bypass handshake form! Use it at your own risk! Open file class.proxyauthenticator.php, insert this into line 50 /** * If we found authentic is ok, but not found account in current forum, * create it and redirect to default controller * * */ $userModel = new UserModel(); $data['Name'] = $Response['Name']; $data['Email'] = $Response['Email']; $UserID = $userModel->Synchronize($data['Email'], $data); $Payload = $this->GetHandshake(); $ConsumerKey = $Provider['AuthenticationKey'];//$this->GetProviderKeyFromHandshake($Payload); $TokenKey = $this->GetTokenKeyFromHandshake($Payload); $TokenKey = empty($TokenKey)? sha1(time() . RandomString(16)):$TokenKey;
if ($UserID) { // Finalize the link between the forum user and the foreign userkey $this->Finalize($data['Email'], $UserID, $ConsumerKey, $TokenKey, $Payload); }
We will create user and finalize to associate users with token,... Next, in line 77, righ after $TransientKey = ArrayValue('TransientKey', $Response, NULL); you need to add this $TransientKey = empty($TransientKey)? sha1(time() . RandomString(16)):$TransientKey;
Because Nonce is PRIMARY KEY, but some system does't use that key, and return empty string (TransicientKey empty) => dupplicate when new user added So, use sha1(time()) to make a fake-random strong and append with a randomstring to make sure it's unique!
Next, change Finalize method to become: public function Finalize($UserKey, $UserID, $ProviderKey, $TokenKey, $CookiePayload) { // Associate the userID with the foreign userkey Gdn::Authenticator()->AssociateUser($ProviderKey, $UserKey, $UserID);
// Log the user in if everything went well $this->ProcessAuthorizedRequest($ProviderKey, $UserKey, NULL, $TokenKey); }
In line 117, file class.proxyconnect.plugin.php Change if ($RealUserID == -1) {
Are you sure that Garden.Authenticators.proxy.SyncScreen is the correct variable?
I had the same problem as @dlim_vernier (trying both Garden.Authenticators.proxy.SyncScreen & Garden.Authenticator.proxy.SyncScreen), and never could bypass the handshake form.
Finally, I did a search for 'SyncScreen' throughout the core, and found Garden.Authenticator.SyncScreen referenced on line 191 of class.entrycontroller.php.
Adding this to my config.php made everything just peachy: