drawlusyk
(Drawlusyk)
July 15, 2014, 6:05pm
1
Hello,
Using amnah for social login.
Yii 2 User - Social authentication
=========
Yii 2 User supports social authentication. It is based on
[yii2-authclient](https://github.com/yiisoft/yii2-authclient), so it works very easily with
the built-in clients[](https://github.com/yiisoft/yii2-authclient#predefined-auth-clients).
In addition, this module also supports social authentication via
[reddit](components/RedditAuth.php).
In general, there are two main ways to use social authentication:
* [Connecting social accounts to existing user account](#connecting-social-accounts)
* [Registration/login using social auth](#registrationlogin-using-social-auth)
Both ways are supported in this module, but take a bit of extra work to set up.
## Setup
First, we'll need to set up the social accounts by adding the components config:
This file has been truncated. show original
Got it logging in but how do you logout? I have called /user/logout, it logs out but as soon as i hit facebook login it logs in again automatically.
If the user hits logout and the someone else wants to login how do you achieve this? Is there a cached session that needs to be removed?
Regards,
Dennis
amnah
(Jellysandwich5+1)
July 16, 2014, 3:01pm
2
It uses the user who is currently logged into facebook. If you want to switch users, you would need to go to facebook directly and log out/switch users first.
drawlusyk
(Drawlusyk)
July 16, 2014, 4:21pm
3
ah ok thanks. makes senseā¦i guess.