dgrubelic / vue-authenticate

Simple Vue.js authentication library
1.43k stars 252 forks source link

linkedin scope not set #161

Open ddsky opened 5 years ago

ddsky commented 5 years ago

when using linkedin and configuring:

 linkedin: {
        clientId: '<MYCLIENTID>',
        url: '/authenticateSocial?provider=linkedin',
        scope: ['r_emailaddress', 'r_liteprofile', 'w_member_social'],
        redirectUri: '<MYREDIRECTURI>',
      }

The linked in login url does not pass the scopes, they are set to null and therefore any further requests with the request token I get from the authentication code result in 403 errors as the scopes are not correct.

ddsky commented 5 years ago

after fiddling around a bit I see that you can override requiredUrlParams like so requiredUrlParams: ['state', 'scope'] in the provider config to force vue-authenticate to add the scope. I feel that this is still a bug since this should be handled in the lib automatically.

dgrubelic commented 5 years ago

Hey @ddsky , you are right. Scope should be in requiredUrlParams. You can always submit PR (if you need it right now) with change and I'll be happy to merge it :)