PHP Classes

Problem with session.

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  Problem with session.  >  (Un) Subscribe thread alerts  
Subject:Problem with session.
Summary:Losing my locale session after oauth.
Messages:4
Author:Tomate
Date:2019-11-21 15:22:49
 

  1. Problem with session.   Reply   Report abuse  
Picture of Tomate Tomate - 2019-11-21 15:22:49
Hello,

I'm trying to setup an oauth process with GARMIN health and I encounter an issue when returning back to my site after auth on garmin form.
The issue is that I coming back to my site (after login on garmin form) disconnected from my site.
I found nothing that justify it, the session cookie don't seams to be altered by the library but I can't see why I lost the session.
Do you have any why this could be the case?

Thanks,

  2. Re: Problem with session.   Reply   Report abuse  
Picture of Tomate Tomate - 2019-11-21 16:58:47 - In reply to message 1 from Tomate
After some digging it's clearly not an issue that is cause by the library.
The issue is cause by the redirect from garmin to my site that loose/reset the session.
If I spam "f5" after the redirect it keeps changin my php session id.
But if I copy the url to a new tab and spam "f5" the session id does not change.
I know it's not the library's fault but if you have any clue, I will gladly take it.

  3. Re: Problem with session.   Reply   Report abuse  
Picture of Tomate Tomate - 2019-11-21 17:46:55 - In reply to message 2 from Tomate
After more digging it seams it is linked to chrome private navigation. If I do the whole process with normal navigation I'm not disconnected form my site.

  4. Re: Problem with session.   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2019-11-21 17:52:47 - In reply to message 2 from Tomate
This is hard to tell but "loosing sessions" usually means session cookies are not recognized. I would need more details to evaluate.

Are session cookies set before outputting any information to the page?

Are you calling the OAuth class before accessing your session cookies?

The class initializes sessions properly in case they were not initialized. You may want to try to call the class first before using the sessions in your application if that makes sense.