LinkedIn functionality
The proposal is to provide this with a new package, djangoldp-profile-linkedin
, which would be an optional sub-package of djangoldp-profile
. I think that all of the below functionality should be included in this package, to keep everything in one place
User Flows
(added these images to show where in the process I propose the feature is presented to the user)
New Users
During the registration process on the front-end site, I can click on a button "Register with LinkedIn". I will be redirected to authenticate with LinkedIn, and then when I authorise Hubl to access my details I'll be redirected back to the main Hubl world application, logged into my new account and ready with my LinkedIn details. We may need a "Migration loading" screen before redirecting to the Hubl world app, but I don't expect that the migration would be longer than a second or two to complete
Existing Users
Logged into the Hubl app and visiting my profile screen, I can select a button to connect to my LinkedIn account. The process will then be the same as for new users (authenticate with LinkedIn and migrate my data, before returning to the Hubl app)
Technical Spec
A plan of tasks and their estimations
-
creating and configuring the package (30 mins)
Missing fields
The fields linked here can be considered complete
I suggest that for now we don't model experience
, which can be modelled in quite granular detail in LinkedIn (and not at all in Hubl), and that we don't add support for multiple websites in the scope of this issue (migrating only one of the websites from a users' LinkedIn account and discarding the others)
This leaves only one field to be added to the model, which I think we could add to djangoldp-profile
(because I think it would be useful to other packages, too:
-
info
(bio) - estimated 30 minutes -
Providing interoperability with LinkedIn skills (estimated: 1 day)
Authenticating with LinkedIn
-
register Hubl as an OAuth client with LinkedIn. We might need to register every backend app individually! -
implementing OAuth client Django-side. djangoldp-account
is already using PyOic. Instructions LinkedIn-side are here -
Handling the creation of a new Hubl account on the AuthFlow completion -
username generation: first_name
+last_name
(adding a number if necessary) -
password will need to be inputted by the user, possibly in a form after authentication? -
when a user is created an email should be sent to administrators (re-use Knowledgebase feature)
Estimation: 2 days
### Migrating LinkedIn data to Hubl account data
-
Use the LinkedIn Profile API to retrieve profile information detailed here. With this information retrieved, the LinkedIn data should be imported into the users' Hubl profile
Estimation: 1 day
-
testing - unit tests included in the other parts of the estimation. It would be good to have an extra 4h or so for integration testing once the feature has been developed? -
documentation (1h)
Keeping Data up-to-date with changes on LinkedIn
Previously we had planned a one-time migration and this is a new requirement. I haven't looked into this yet. Django libraries for Stripe achieve this by providing Django models on the LinkedIn schema and using Stripe-provided webhooks to keep the database up-to-date. We should start by searching for an equivalent library