Closed koseduhemak closed 6 years ago
Hey!
It does look cool, I use a similar approach in software I've created for clients with zf3-circlical-user that need external authentication. The easiest way to go about it, is simply to make the secondary authentication trigger the creation of a standard, unchanged Circlical-user record.
I create a table called 'external_auth'. It contains three columns:
method: e.g., Google, Twitter external_id: The stable Google or Twitter ID that's returned by their auth user_id: An internal, standard user_id
Imagine you have a Controller called TwitterRegistration that understands that a user has logged in. When the success callback comes back in:
otherwise
Thank you for your extensive answer! I will try your suggestions 👍
Cool - good luck man!
I already have a working login / registration mechanism, but I want to let my users to authenticate also via Facebook Login / Google Login. The module https://github.com/hybridauth/hybridauth looks promising.
However, instead of authenticate via email + password I would need another authentication mechanism based on the social login tokens...
Is there an easy way to integrate such behavior? My first idea would be to extend AuthenticationService and override the
authenticate
method.Thank you.