We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Social Login

Hi,

I'm looking for some advice or tips on implementing social login into one of my projects. Particuarly support for both Twitch.tv and Youtube. I need assistance with it functioning like so:

  • User authenticates & account gets created
  • User logs out but information remains in the database
  • User upon logging in again, will be able to utilize their old information from the time they last hit /logout.

Any help to get this functioning would be appreciated.



3.7k
edited Jun '18

That has support for saving your refresh token and implementing into the session correct? What I mean is that if I login with with facebook, then I hit "logout" then I re-login I'd still be able to pull the other fields from my 'users' table such as a name, etc right?

This might help you getting started:

https://github.com/calinrada/PhalconUserPlugin

I was thinking of that, however, I noticed with hybridauth it requires a bit of back-end work for session saving, etc. I was looking for a solution similar to laravel's socialite addition, but natively an alternative for phalcon.

Other implement Hybridauth