Topic: Single Sign On - Outside of Main LuxCal Folder

How does one implement single sign from a page that is not inside the main LuxCal folder ... I created page a level up with iframe and want the  single sign on from there but it doesn't work

Re: Single Sign On - Outside of Main LuxCal Folder

The problem is that in this case your application and the calendar are not in the same domain and the PHP session with the user name or email address is not accessible by the calendar.
I have no ready-made solution for this. I will think about it and when I have a bright idea, I will come back here shortly.

Roel

Re: Single Sign On - Outside of Main LuxCal Folder

Roel wrote:

The problem is that in this case your application and the calendar are not in the same domain and the PHP session with the user name or email address is not accessible by the calendar.
I have no ready-made solution for this. I will think about it and when I have a bright idea, I will come back here shortly.

Roel

Thanks, I managed to get it working ... My web application has an include file where the session variables are set, I added/set the lcUser session variable in there and it seems to work as expected  now....

Re: Single Sign On - Outside of Main LuxCal Folder

Actually it isn't working, I thought I had fixed it but it doesn't  seem to work as expected.

I have set  $_SESSION['lcUser']  and can echo it to the page as a check but the calendar does not auto login user

Re: Single Sign On - Outside of Main LuxCal Folder

You're saying you can "echo it to the page", but to what page? Can you echo it in a test script running in the calendar iframe?

Re: Single Sign On - Outside of Main LuxCal Folder

calendar page with single sign on and calendar in iframe

Re: Single Sign On - Outside of Main LuxCal Folder

setting $calPath = '/'; seemed to fix the issue ... thanks

Re: Single Sign On - Outside of Main LuxCal Folder

That's great!
Roel

9

Re: Single Sign On - Outside of Main LuxCal Folder

Please note, I am using Codeigniter 4. and I'm not the "sharpest knife in the drawer."

In my controller:

$session = \Config\Services::session();
                $newdata = ['lcUser' => 'admin'];
                $session->set($newdata);

In my view:

<style type="text/css" media="screen">
    .my-body{
    width: 100%;
    }
  </style>
 

<table class="my-body" id="events">
    <tr>
        <td><?php
            echo 'lcUser is:  ' . $mycal_user; ?><br>
            <iframe class="embed" id="lcIframe" name="lcIframe" src="  mypac_cal/ "  style="height: 700px; width: 100%;" title="Upcoming Events"></iframe></td>
    </tr>
</table>

The php in the view echos lcUser is: admin

I changed the $calPath = '/'; and commented out the remainder.

I was automatically logged in. But every time I tried to edit, add, update settings, etc. I got the following error message.

INVALID REQUEST

Please restart the Calendar.

I undid my edit in the index.php by setting it back to original. I am no longer getting an error message and everything functions as expected.

Except, I am no longer being automatically logged in.

Thoughts?

Thanks

10

Re: Single Sign On - Outside of Main LuxCal Folder

OK I set $calPath = '/';

Currently not being automatically logged in. After I manually log in, I'm getting error message

PHP SESSION EXPIRED

Please restart the Calendar

I'll be back I need to rest my brain.

Thanks

Re: Single Sign On - Outside of Main LuxCal Folder

Hi there,

What calendar version are you using?
Did the Single Sign On work before?
And if so, when did it stop working? Did it stop working after an upgrade of the calendar?

Roel

12

Re: Single Sign On - Outside of Main LuxCal Folder

LuxCal version 5.2.0M

I did a clean install complete with your installer setting up the database.

My summary of reactions:

When I set the $calPath to '/' then I automatically logged in. BUT, I got the various errors when I tried to add events, change settings, etc. The latest was PHP SESSION EXPIRED.

When I left the $calPath as set up originally, I DID NOT sign in automatically. I had to manually sign in and I then could make changes, updates, etc.

By the way these actions occurred when I was inside a frame and when using the calendar directly from the url.

Thanks for the reply.

13

Re: Single Sign On - Outside of Main LuxCal Folder

More questions!

I have the path $calPath set to default. I manual log in as admin. I click on the "User Profile" under the user's name and I get a popup.

SQL error. See 'logs - sql   log '


Here's the sql log:

mycal ERROR Script: - mypac_cal - index php - SQL execute error: SQLSTATE [ 42S22]  : Column not found: 1054 Unknown column 'number' in 'field list'
Values string: 2

Thanks!

Re: Single Sign On - Outside of Main LuxCal Folder

Hi there,
The last problem is a known problem and the solution can be found in this forum under Known Issues and Fixes.
Roel

15

Re: Single Sign On - Outside of Main LuxCal Folder

Thanks for last answer.  FIXED!

Since I'm using Codeigniter4, I'm wondering if my $calPath issue is affected by the CI4 pathing. I'll continue. IF (big IF) I discover a solution, I will report it.

Thanks for your prompt responses.

Re: Single Sign On - Outside of Main LuxCal Folder

The last problem is a known problem and the solution can be found in this forum under Known Issues and Fixes.

Where exactly in Known Issues and Fixs can that be found. I'm either blind or stupid but I can't seem to find the solution.

17

Re: Single Sign On - Outside of Main LuxCal Folder

I believe this was the topic:

LuxCal Web Calendar → Known Issues and Fixes → LuxCal 5.2.0 SQL error when opening User Profile

Here's the url on that page:

h t t p s : / / www . luxsoft . eu / lcforum / viewtopic . php ? id=401

Since this forum can't have urls listed, I broke the url up.

Re: Single Sign On - Outside of Main LuxCal Folder

dwcondu wrote:

I believe this was the topic:

LuxCal Web Calendar → Known Issues and Fixes → LuxCal 5.2.0 SQL error when opening User Profile

Here's the url on that page:

h t t p s : / / www . luxsoft . eu / lcforum / viewtopic . php ? id=401

Since this forum can't have urls listed, I broke the url up.

Thank you