Closed (fixed)
Project:
HybridAuth Social Login
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Jan 2012 at 17:47 UTC
Updated:
31 Oct 2013 at 14:00 UTC
Why are you setting a provider preference in a cookie in the hybridauth_popup() function?
Comments
Comment #1
rwohlebThis is used when using the single button or single link style. In this mode the first time someone views it they get a full list. The next time they login, if the cookie still exists, it will show a login button for the last provider used. The idea here is that it's a friendly reminder of the login they used previously.
Comment #2
duozerskWe have lost this feature in the 2.x version. And now I think we can revive it, but not the way it was working before.
The idea is to still use the cookie to store the last used provider, but not to process it server-side, only client-side. We can add some jQuery code that will create this cookie and then also read it and mark the last used provider icon with the "hybridauth-last-used" class or smth like this. Then we can also supply some css to highlight this provider icon (it will actually be the icon pack responsibility to do this - to have this css code).
AndyB
Comment #3
duozerskComment #4
duozerskImplemented in http://drupalcode.org/project/hybridauth.git/commit/1421330
Now the last used provider is marked with "hybridauth-last-provider" class. See default icon packs on how to use it in CSS.
Thanks
AndyB