Welcome Guest, Not a member yet? Register   Sign In
Attempting OpenID, but having session problems.
#1

[eluser]Unknown[/eluser]
Hi All,

I'm trying to hack the JanRain OpenID consumer code into a CodeIgniter framework and it's ALMOST working, but I have a session problem. I'm wondering if anyone has successfully used this with CI?

I'm using a slightly modified version of the JanRain OpenID module called EasyOpenID. It uses the JanRain libraries but a custom front-end. I set up the standalone demo and it's working fine.

I got the code hacked into my CI application and the initial steps work great. I get redirected to my OPenID provider, Accept the connection there, and it returns to the correct URL in my application, with a ton of $_GET data. I have the mod mentioned in this forum to keep $_GET intact.

The problem I'm running into is that $_SESSION is wiped out when I return to my CI app. The JanRain code pushed some data into $_SESSION on the front end and attempts to grab it back on the return. When the code checks for the session data, it finds NULL and reports a failure. In the standalone demo code the session variable persists and I end up with a successful attempt.

Does the CI framework do anything strange with the $_SESSION by default? Do I need do do something special to keep it intact?

Any ideas would be greatly appreciated.

Thanks, Shawn
#2

[eluser]axle_foley00[/eluser]
I doubt CI does anything to $_SESSION by default. But is there anyway or have you tried to maybe incorporate CI's Session Class? I mean it should work without it but perhaps it's worth a try anyway.
#3

[eluser]Unknown[/eluser]
I browsed through the OpenID code and it has it's own session class that basically just assigns stuff to $_SESSION. I think I will try just working the CI session class into it and see what happens.
#4

[eluser]Unknown[/eluser]
What is this mod you're talking about, to keep $_GET intact ?

Oh and by the way, I implemented PHP OpenID on my blog, http://remiprevost.com, so you should be able too Wink




Theme © iAndrew 2016 - Forum software by © MyBB