Automate linkedin sign in with a saved email and password

Hi, is it possible for me to perform an automated linkedin sign in using auth0 using a pre-determined email and password (e.g. retrieved from localStorage)?

If not, how is the user_id (the “sub” of the JWT) for a linkedin account generated? Is there a standard way in which I can compute it on my own?

Also, is it possible for me to generate an auth0 JWT which I can send to my API on my own without going through auth0?

I wouldn’t recommend storing email/password in localStorage. Can you tell us a bit more about your use-case?

Why not get it from the user DB, why would you need to compute it? I don’t think you would be able to.

We manage the private keys if you are using RSA256, last I checked you didn’t have access to them. If you use a symmetric algo then you could. I probably wouldn’t recommend this though. Now I’m really curious what you are trying to do. :smile:

Well basically I want to do something using the LinkedIn Voyager API because I realised that I can’t do it with the public API. So I need the user’s username and password and I can’t use the socialIdentity returned by auth0. But I still want to use auth0 to manage the logins if possible. I’d just like a seamless login (user keys in email and password directly into my app, then my app sends the email and password concurrently to both the voyager API and to auth0 to login).

Is that possible?

And yes, I know about the implications of using the Voyager API but I’d still like to try (for testing purposes at least).

My app is a Cordova app.

Still not sure I grasp the needs here. Are you are trying to store a user’s LinkedIn credentials?

Yes, basically my app needs to use the user’s LinkedIn email and password directly and thus I need them to key them into my app and not just into the auth0 login page.

I don’t want them to have to login again into auth0 (which means that they would have to key in their email and password a second time) after they have already keyed in their LinkedIn email and password into my app. Is there a way that my app can use the email and password which has already been entered by the user to login into auth0 via LinkedIn?

You can’t (and shouldn’t) do this. When a user logs in with LinkedIn, they are sent to linkedin.com where they enter their credentials and a token is returned to the application if it is successful. You shouldn’t be handling passwords for a third-party identity provider.

If you want to get API access to a user’s LinkedIn account you can use their IDP access token.

The problem is that I can’t use the LinkedIn public API for what I want to do (I would have to become a LinkedIn partner and LinkedIn rejected my application). Thus, I need to use the Voyager API which requires me to use the user’s email and password rather than a token.

Currently I’m using a JavaScript injection into the InAppBrowser to fill in the user’s email and password, however, that is obviously a hacky and undesirable solution.

@customautosys,

I am going to mark this as solved, as this is not something that we can recommend as it does not follow linkedIns TOS.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.