Jump to content

Trouble with SSO


Tom S.

Recommended Posts

My IPS suite runs on app.mydomain.com

I have a front site that runs on mydomain.com

I'm trying to use SSO to validate if the user who is on mydomain.com is logged into IPS (app.mydomain.com).

I'm using this code:

/* Require the init.php file from the Community Suite root directory */
require '/path/to/suite/init.php';

/* Initiate the session to verify who this user is */
\IPS\Session\Front::i();

print_r(\IPS\Member::loggedIn());

But the print_r only shows

stdClass Object ( [timezone] => Europe/London ) 

The front site has access to the IPS cookies as I am able to run this code

echo $_COOKIE['ips4_IPSSessionFront'];

And it displays the value. Also, I have checked and I am logged in when testing this.

Any ideas or suggestions why `\IPS\Member::loggedIn()` is not properly getting all the data?

Link to comment
Share on other sites

An additional thing that may be relevant. When I use the ips4.php on mydomain.com I get the following warnings:

Quote

MySQL Requirements

  • MySQL connection could not be established to perform version check. Make sure your MySQL Server version is 5.0.3 or above (5.6.0 or above recommended).
Quote

Additional Requirements

  • You do not have ionCube Loader or Zend Guard Loader available. This is required if you will be using IP.Nexus. If you are planning to use IP.Nexus, you should contact your hosting provider or system administrator to ask for one of these (it doesn't matter which) to be installed.

However, MySQL is installed, and I am able to manually connect to it from mydomain.com

Link to comment
Share on other sites

That's the front end domain?

The IPS software supports PHP 7.2, so I'm not sure what the bug would be. If you were somehow using two different versions of PHP that could explain the issue (it is possible things like session handling behind the scenes may have differences that would cause something like this to happen).

 

Link to comment
Share on other sites

So if your front end is 7.1, and the community is 7.2 it works, but if both are on 7.2 it doesn't?

One possibility is that your PHP configuration is actually changing when you change PHP versions. Perhaps, for instance, the cookie path is being set to the current directory so it can't be read when a user is visiting outside of the forum directory. Ultimately it's pretty difficult to say from here.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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