Why are you setting a provider preference in a cookie in the hybridauth_popup() function?

Comments

rwohleb’s picture

Status: Active » Postponed (maintainer needs more info)

This 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.

duozersk’s picture

Title: Cookie set in hybridauth_popup() » Somehow mark the last used provider
Version: 7.x-1.x-dev » 7.x-2.x-dev
Assigned: Unassigned » duozersk
Status: Postponed (maintainer needs more info) » Active

We 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

duozersk’s picture

Category: support » feature
duozersk’s picture

Status: Active » Fixed

Implemented 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.