LinkedIn Authentication

Article author
Duncan Hamra

This article will show you how to add a "Continue with LinkedIn" button to your signup, login, and profile forms. Part one is a 3-minute video with step-by-step instructions to connect your Memberstack and LinkedIn accounts. Part two will show you how to set up the front end. 

Important: If you are receiving an error when trying to connect LinkedIn that resembles the follow then you need to make sure you are copying and pasting the actual Client Secret and not the ****. 

{"error":"OPError: invalid_client (Client authentication failed)"}

Part 1: The Backend

Here's a link to LinkedIn's Developer site.

Part 2: The Frontend

sign_in_with_linked_in.jpg

If you're using Memberstack's pre-built sign-up, login, or profile UI, then social auth button will appear automatically. 

If you'd like to add a social auth button to your custom Webflow forms this next section is for you.

Signup & Login Forms

I recommend copying one of our Webflow social auth buttons. They are 100% built in Webflow, already have the attributes you need, and are easy to customize:

A) Light Theme LinkedIn Button 

B) Dark Theme Linkedin Button

FAQ

Can members login using a sign up form?

Yes! By default, members who already have an account will automatically be logged.

Can members sign up using a login form?

By default no, but you can enable sign ups in login forms by adding a new attribute to your login modal buttons. Here's a 1-minute video tutorial showing how to add the attributes. 

  1. Add the data-ms-social-auth-allow-signup attribute to your custom login forms (data-ms-form="login").
  2. Add the data-ms-social-auth-allow-signup attribute to your login modal buttons (data-ms-modal="login").

Once complete, your social auth buttons will create accounts for new members. 

Profile Forms

In this other tutorial, we'll create a UI for members to connect providers, view previously connected providers, and (optionally) disconnect providers. 

Social Auth Buttons in Profile Forms

Troubleshooting

Errors are usually caused by a miss-matched redirect URI. Click here to learn more. 

Was this article helpful?

Comments

16 comments

  • Comment author
    Illan Knafou

    It seems that this error occurs because LinkedIn has changed its OAuth 2.0 scopes names

    {"error":"OPError: unauthorized_scope_error (Scope "r_liteprofile" is not authorized for your application)"}
    3
  • Comment author
    Duncan Hamra
    • Edited

    Hi Illan Knafou 👋

    I just did some testing on my end, and it all appears to be working. Can you confirm that the scope r_liteprofile is authorized on your Linkedin account?

    It appears to have happed automatically for Tyler... what does it look like on your end? Video for ref

    1
  • Comment author
    Illan Knafou
    • Edited

    Hey Duncan-Hamra , thank you for your quick reply!

    By doing the same tricks as Tyler, I have this:

    openidUse your name and photo
    profileUse your name and photo
    emailUse the primary email address associated with your LinkedIn account
     
    Instead of r_emailadress and r_liteprofile
     
    I think that's because Linkedin recently changed its authentication method from Sign in with LinkedIn to Sign in with LinkedIn using OpenID Connect. 
    1
  • Comment author
    Duncan Hamra
    • Edited

    Thank you for this info!! It's super helpful. 

    Tyler Bell can you check this out when you're back from the the WF Conf? 

    1
  • Comment author
    Stephanie Sakoda
    • Edited

    I am experiencing the same issue as Illan with setting up LinkedIn Auth. Doesn't look like the 'Sign In with LinkedIn' product is available any longer. 

    2
  • Comment author
    Stephanie Sakoda

    Duncan-Hamra Just curious about the status of this issue. For a number of security/quality reasons, LinkedIn auth is the only one our site will offer for signup. I love all the amazing work you all are doing and appreciate any time you can give this!

    1
  • Comment author
    Duncan Hamra

    Hi Stephanie Sakoda 👋 Thank you for the follow up!

    Let me check in again with Tyler Bell now that he's back from the WF conference. 

    1
  • Comment author
    Oussama Atlassi

    Facing same issue Duncan-Hamra Can you please update on it by when it will be resolved. 

    1
  • Comment author
    Scayler Memberstack

    Hey Duncan-Hamra we are also experiencing the same issue. Issue is most likely related to what was described as the OAuth options we get are
    We are sort of in a tight timeframe for this as we need it up and running next week so any quick fix is highly appreciated! 

    1
  • Comment author
    Duncan Hamra

    We were able to replicate the issue and are working on a fix. Turns out we needed to bring in outside help for this, and they are working with us this week. 

    Thanks for you patience and keep an eye on your inbox.

    I will tag everyone here once the updates are live. Scayler Memberstack Oussama Atlassi Stephanie Sakoda Illan Knafou

    1
  • Comment author
    Stephanie Sakoda

    Thank you for the update Duncan-Hamra!

    0
  • Comment author
    Scayler Memberstack

    Duncan Hamra, any updates here?

    0
  • Comment author
    Duncan Hamra

    Scayler Memberstack Stephanie Sakoda Oussama Atlassi Illan Knafou
    Thank you all so much for the patience while we got the right people on the job. I'm happy to report the issues are fixed!! You should be able to use LinkedIn again without issue. 

    0
  • Comment author
    Scayler Memberstack

    Duncan-Hamra We are still getting the same error on our end about

     

    1
  • Comment author
    Oussama Atlassi

    Same here, I have followed all the steps again and I am getting the same error as Scayler Memberstack

    0
  • Comment author
    Duncan Hamra

    Oussama Atlassi and Scayler Memberstack, can you try disabling and re-enabling LinkedIn for me in your dashboard? That should fix it.  

    0

Please sign in to leave a comment.