Skip to content
This repository was archived by the owner on Sep 20, 2018. It is now read-only.

Conversation

imylyanyk
Copy link

I have dropped a very basic support for LinkedIn login.
Right now it's only a raw login button, but you can retrieve the required data from LinkedIn and insert it where needed.
All you have to do is to provide the api_key which you can get from https://developer.linkedin.com/ and add your website to the allowed domains in the LinkedIn app settings.

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="//platform.linkedin.com/in.js">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any special reason to have this in the head? It would block page rendering until it loads.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the way it's stated in the documentation: https://developer.linkedin.com/docs/getting-started-js-sdk (in the "Initialize the SDK in your webpage" section).

@darkyen
Copy link

darkyen commented Feb 18, 2016

👎 This stands out because this is exactly what linked in is not. Clean, sassy and useful.

@darkyen
Copy link

darkyen commented Feb 18, 2016

As in, either have an adapter for having import from * (Hired, Careers.SO, WhateverAPI, LinkedIN) where others can add an adapter instead of seperate importers for everything. Sorry if I sounded harsh in my first comment.

@imylyanyk
Copy link
Author

@darkyen What do you mean by "this stands out"?

@awalgarg
Copy link
Owner

Note that the site is currently hosted on gh-pages. And for this to work, I'd need to commit my API key to github. This is not very fork-friendly. Would you happen to know of a different way of querying linkedin?

@imylyanyk
Copy link
Author

@awalgarg I will take a look into that.
But you have access to the dev. console of linkedin App, where you can allow access to the API with your key only from certain domains. Would that solve the problem?

@darkyen
Copy link

darkyen commented Feb 18, 2016

@imylyanyk A button for each login and each provider adding their own library (because there are plethora of data sources where this data can be imported from) will imho go against the minimalism of the app.

@imylyanyk @awalgarg about the keys issue, why don't you explore using https://auth0.com/ 's lock ??

Essentially with lock it is

lock.login(function(err, profile){
    // * profile here 
   /// normalize & render
});

That can fetch data from many sources, and will be a unified entry point

@MadaraUchiha
Copy link

@imylyanyk @awalgarg Committing API keys is never a good thing.

@darkyen
Copy link

darkyen commented Feb 18, 2016

Also @awalgarg IIRC many providers have origin restricted api keys for SPA only, like facebook for instance.

Anyone supporting OAuth2.0 should have support for that.

@awalgarg
Copy link
Owner

you can allow access to the API with your key only from certain domains. Would that solve the problem?

@imylyanyk indeed, that shall be fine for now.


@darkyen thanks, I will have a look at that. A unified entry point shall be a great option indeed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants