Jump to content

External login / SSO issue


Jibeji

Recommended Posts

Posted

Hello,

After upgrading from 3.4 to 4, I am refactoring my SSO system based on IPS users, and got a strange issue.

First, I log the user in to IPS4 with :

$IPSLogin = new \IPS\Login\Internal;
$IPSLogin->init();

$member = $IPSLogin->authenticate(array('auth' => $_POST['username'], 'password' => $_POST['password']));

if ($member) {
   $expire = new \IPS\DateTime;
   $expire->add( new \DateInterval( 'P7D' ) );
   \IPS\Request::i()->setCookie( 'member_id', $member->member_id, $expire );
   \IPS\Request::i()->setCookie( 'pass_hash', $member->member_login_key, $expire );
}

It works, if the user goes to the forum he is authenticated but if I try to retrieve user's information with:

\IPS\Member::loggedIn()

It doesn't provide any information until the user has browsed the forums.

If he goes to the forum then go back to another page which uses this method, all his information are correctly gathered.

It seems that when the user goes to the board, the board adds some information that are not defined with my authentication method.

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...