× Joomla LinkedIn support forum

Topic-icon 500 error with JLinked

Active Subscriptions:

None
11 years 11 months ago #22030 by kross76
Replied by kross76 on topic 500 error with JLinked
I'm still trying to figure out how, when it creates the Joomla user account, it knows how to map to the LI account? Is the LI account somehow identified via a cookie or something. And what if the user isn't logged into his LI account when the Joomla user account is created?
The topic has been locked.
Support Specialist
11 years 11 months ago #22034 by alzander
Replied by alzander on topic 500 error with JLinked
When the user clicks the Login With LinkedIn button, the authentication popup from LinkedIn will show up (if it's their first time 'approving' your LinkedIn application). Once they approve, yes, a special cookie is placed on their system with an encrypted 'token'. JLinked is then notified that a user has authenticated and approved your application through LinkedIn. JLinked then exchanges that 'token' with LinkedIn to get a special LinkedIn user-id for the visitor. JLinked looks that user-id up in the JLinked Usermap table to see if it's already associated with a Joomla account. If so, JLinked logs that user in. If not, JLinked redirects the user to the Login / Register page.

At that point, the user is definitely authenticated with LinkedIn (we do multiple checks to make sure). From there, when the user uses either side of the Login or Register form, we then grab that LinkedIn user-id and associates it with the Joomla user that was just used to login (whether we created it or it was already existing).

When the user revisits the page later, if they are already logged into LinkedIn, the authentication popup will not appear. LinkedIn only needs the user approval for your application once, so you'll skip that screen.

Hope that explains the process. There's a lot more (believe it or not) going on under the scenes, but that's the quick overview :)

Alex
The topic has been locked.