PHP Classes

php oauth api and cakephp 2 sign in problems

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  php oauth api and cakephp 2 sign in...  >  (Un) Subscribe thread alerts  
Subject:php oauth api and cakephp 2 sign in...
Summary:cakephp auth component cant process login
Messages:2
Author:Seth Polansky
Date:2014-05-07 08:31:24
Update:2014-05-07 10:43:05
 

  1. php oauth api and cakephp 2 sign in...   Reply   Report abuse  
Picture of Seth Polansky Seth Polansky - 2014-05-07 08:31:24
i have integrated the oauth into my UsersController code and i get proper oauth responses back from both google and yahoo. when i retrieve the users account from my db and log that user in with the cakephp auth component, the auth component isn't recognizing that the user is logged in and session redirects are not working either. seems like the session is getting messed up.

i am wondering if the oauth http session is clashing with the cakephp session and how to prevent that. my normal logins (non-oauth) work fine using the same code.

-SP

  2. Re: php oauth api and cakephp 2 sign in...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-05-07 10:43:05 - In reply to message 1 from Seth Polansky
It is hard to tell because I do not use the Cake PHP framework.

The OAuth client base class uses only two session variables: OAUTH_STATE and OAUTH_ACCESS_TOKEN .

The OAuth class also starts the sessions if they were not started. I wonder if that is making Cake PHP fail somehow.