-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed problem with setting Auth Adapter #125
Conversation
If any other module calls the AdapterChainFactory prior to ScnSocialAuth (for example BjyAuthorize) then the Auth Adapter defaults back to ZendDB. See : bjyoungblood/BjyAuthorize#208 and SocalNick#123 To fix the issue I remove any previously attached listeners for authenticate and logout and replace with HybridAuth adapter instances for those events. As a precaution I also reset the adapter on the zfcuser_auth_service. The outcome is the same as the previous technique of settings the Module Options on the fly (in that we enforce te HydridAuth adapter exclusively). This will overwrite any previously configured adapters. I have tested with BjyAuthorize.
Signed-off-by: Mat Wright <mat@bstechnologies.com>
Signed-off-by: Mat Wright <mat@bstechnologies.com>
Signed-off-by: Mat Wright <mat@bstechnologies.com>
@matwright This works perfectly for me. |
@SocalNick What do I need to do to get this passing in Travis ? It is complaining about trailing spaces, I've run Zend Studio formatter as well as manually removed any spaces, etc. But it's still only passing on php 5.3.3 Travis error:
|
@jeffery glad its working for you too. |
Hi @matwright There are some white spaces missing and some are unwanted. Have a look at the screenshot attached. The diff shows you which lines to change. |
you can download http://cs.sensiolabs.org/get/php-cs-fixer.phar and test the code with the following command:
You can read more about the error codes at https://github.com/fabpot/PHP-CS-Fixer |
thanks @jeffery I'll download that and recommit with the spaces sorted. |
@jeffery That fixed it, passing all Travis builds now. |
@matwright - thanks for uncovering the issue and the contribution. Give me a few days to roll it around and test it out. |
@SocalNick - happy to contribute : ) let me know if you need anything changing. The sooner bjyauthorise incompatibility can be resolved in master, the better. |
Edited: Went through the same issue when enabled bjy (using doctrine). Applied your solution and works very well. Thanks ! |
Can everyone also try PR #128 as an alternative? |
@SocalNick Just tested PR #128 . Worked fine for me |
Closed in favor of #128 |
Guess base url
Currently if any other module calls the AdapterChainFactory prior to ScnSocialAuth (for example BjyAuthorize) then the Auth Adapter defaults back to ZendDB.
See :
bjyoungblood/BjyAuthorize#208
and
#123
To fix the issue I remove any previously attached listeners for authenticate and logout and replace with HybridAuth adapter instances for those events.
As a precaution I also reset the adapter on the zfcuser_auth_service.
The outcome is the same as the previous technique of settings the Module Options on the fly (in that we enforce te HydridAuth adapter exclusively). This will overwrite any previously configured adapters.
I have tested with BjyAuthorize.