Topic-icon Github Logging in issue

Active Subscriptions:

None
9 years 9 months ago #59165 by [email protected]
Hi

We have been using the 'Social Connect' plugin by 'Joomlaworks' to provide our users with social login .... we are now integrating Payplans into our app which uses JFBC as its social login.

So ... we have installed JFBC and have been re-creating and re-setting up all of the social apps with their ids,secrets etc.

The problem we are facing at the minute is that some of our users who had previously logged in using their Github accounts, now get a message saying 'Thanks for signing in using Github. Do you already have an account on this site, or would you like to create one?'

And it asks them to log in, or create a new account .... but they already have an account

Any ideas, why it wouldnt be linking the 'accounts' correctly? .... I can see that the Joomla user email is the same as the Github user.
The topic has been locked.
Active Subscriptions:

None
9 years 9 months ago #59166 by [email protected]
Nevermind .... I understand why it is doing it now!

The account must have been created prior to ANY social login stuff being installed, as the account has a PW .... then JFBC component has checked and realised ther is an existing account for that email and asked about logging in and merging!


So i think we are all good!
The topic has been locked.
Support Specialist
9 years 9 months ago #59170 by mel
Replied by mel on topic Github Logging in issue
Yes, we try not to trample or link to existing accounts with the same email addresses. If interested, you can also check your 'Automatically Link Users by Email' setting in JFBConnect backend > Configuration > General area to see if toggling it to 'Yes' will help map the accounts better for pre-existing users. It sounds as if you've gotten around the issue, so let us know if you continue to have any more problems.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 9 months ago #59185 by [email protected]
Hi ... so we are still having the same issues logging in correctly and mapping the accounts.

I have looked in the DB at the users, and if the user used a social account to sign in previously (when using SocialConnect), they had a Joomla user account created but there is NO password.

SO ... now since we have JFBC installed, and we try to log in, it says 'thanks for signing in, why not connect your joomla account or create a new one' ...... BUT we can not connect the joomla account as we have no PW .... and we can not register a new account as it says 'EMAIL' already exists ....

We already have 'Automatically Link Users by Email' setting set to YES ... and we get the same stuff.

Is there a way to connect the accounts, without forcing the user to enter their Joomla UN and PW?

Any ideas?
The topic has been locked.
Support Specialist
9 years 9 months ago #59192 by alzander
Replied by alzander on topic Github Logging in issue
The main problem here is that the automatic linking of accounts with the same Joomla and social network email address isn't working. That's the main way that this problem resolves itself.

Have you tested other social network accounts and do they get properly automatically linked if the email address is the same? That will help us narrow down where to focus (Github integration specifically or that setting in general).

The only other option I can suggest, though even I don't think it's a good one, is putting a Forgot Password link on the Login section of our page asking the user to link accounts. Forgot Password should set the user up with a password.. I think. That's a pretty ugly solution though, so obviously want to focus on getting accounts to link properly the first time.

Thanks,
Alex
The topic has been locked.
Support Specialist
9 years 9 months ago #59193 by alzander
Replied by alzander on topic Github Logging in issue
Alright.. reading up a bit more on Github's Authentication flow and they've actually changed their permission model a little bit. Right now, we request no permissions from the user, which by default gives access to:

Grants read-only access to public information (includes public user profile info, public repository info, and gists)

If the user from Github hasn't set a public email address, then Github would not return any email address when they register and JFBConnect wouldn't be able to automatically connect the user to their Joomla account.

It looks like they've added a new scope for user:email which lets us see all email addresses for the user, even if they aren't public. We'll have to do some testing with this, but my guess is that should let you get the same email address as your previous solution.

Give us a day or so and we should have an answer for you soon on the code change required.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 9 months ago #59195 by [email protected]
Thanks Alex

Facebook Authenticated and linked straight away.

Have also got a colleague to try their 'Github' account, which worked for them without any issues .... I have compared both github accounts and you are correct! The working Github account has a public email set, and the non working account has no email set!

So it does seem like you are spot on!

We will sit back and wait for your code amends :)

Many thanks for your help on this!
The topic has been locked.
Support Specialist
9 years 9 months ago #59223 by mel
Replied by mel on topic Github Logging in issue
I just wanted to note that I think I have a solution for this checked in for the next 7.0.3 release. When I set the 'Don't show my email address' setting in my Github profile, with this code change, the email address can still be retrieved properly. The user will be required to grant JFBConnect permissions to retrieve the full user info now, but there's no way around that. This scope has been around for awhile, but I found a different endpoint in the API that is needed to retrieve the email addresses.

I still need to do some more testing, but I think it's looking good.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 9 months ago #59227 by [email protected]
Fantastic news .... I dont think 'asking to give JFBC permissions' is a bad thing ... and if that is the way it has to work then that is all good! :)

Looking forward to the release and this fix!

:)

Many Thanks for keeping us posted!
The topic has been locked.
Active Subscriptions:

None
9 years 9 months ago #59267 by [email protected]
Just realised you released a new version of JFBC.

Just thought I would let you know that the 'Github' logging in works a treat :)

Thank you!
The topic has been locked.