-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unauthorised scope r_liteprofile with linkedin oauth2 #45
Comments
This is a known issue with LinkedIn. Some OAuth applications there do not yet have the 1.0.0 won't work without |
@pjg This is gonna sound really weird but I didn't even have the |
Interesting. From what I could gather it seems to me like LinkedIn Oauth stuff is quite a mess on their end, so it's not that surprising that you observe such non-deterministic behaviour. |
Okay. I'll wait for them (there's no other option right). Should I close the issue now or once it is actually resolved ? |
I haven't found a way to contact them :/ I'd leave it open as more ppl are likely to run into it. |
Regarding the |
I change SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_basicprofile', 'r_emailaddress'] to SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_liteprofile', 'r_emailaddress'] |
config.omniauth :linkedin, client_id, secret, :SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE => 'r_liteprofile' worked |
For anyone struggling with this, one needs to enable on the LinkedIn page "Products" the option "Sing-In with LinkedIn". This will take 5 min for approval by LinkedIn after which the required scope "r_liteprofile" will be added to the "O_Auth 2.0 Scopes" section in LinkedIn. Found the answer on StackOverflow and works like a charm. |
The option "Sing-In with LinkedIn" on the LinkedIn page "Products" seems to be gone. Only "Sign In with LinkedIn using OpenID Connect" is available in my new created LI app, which doesn't work for me. Does anyone know where to find it? |
I'm having this same issue like right now. still looking for a solution |
any ideas on how to solve this? I'm trying to integrate my app with linkedin but sign-in doesn't really seem to be working |
Having the same issue here (Sign in with LinkedIn does not work, gives the error "Scope "r_liteprofile" is not authorized for your application". But I don't know where to enable that scope(( |
Are you using Next.js? I have found a way to do it in my Next.js app inside
of the Next auth options
…On Mon, 28 Aug 2023, 01:21 Alvaro Aquije, ***@***.***> wrote:
any ideas on how to solve this? I'm trying to integrate my app with
linkedin but sign-in doesn't really seem to be working
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARHMW3IG6P5UDUSLVRRJR3LXXPQB3ANCNFSM4GPXKGFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I found a solution to this, in my Next js app. I can access the code when
I'm with my laptop
…On Mon, 28 Aug 2023, 16:46 Andrii Bas, ***@***.***> wrote:
Having the same issue here (Sign in with LinkedIn does not work, gives the
error "Scope "r_liteprofile" is not authorized for your application". But I
don't know where to enable that scope((
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARHMW3O47JB4LU7C7D4WMKDXXS4MRANCNFSM4GPXKGFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
They have deprecated the |
This worked for me in NextJS, pass in authorization parameter to override and use the new supported scopes defined with OpenId it will override the previous default scopes r_liteprofile and r_emailaddress ones |
Solution suggested by @tapiarafael worked for me. Used scope=profile instead of r_liteprofile. |
Glad it worked!
…On Wed, 6 Sep 2023, 20:03 ravijammi, ***@***.***> wrote:
Solution suggested by @tapiarafael <https://github.com/tapiarafael>
worked for me. Used scope=profile instead of r_liteprofile.
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARHMW3PX72E5AOIHWYO6XU3XZDCG3ANCNFSM4GPXKGFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Solution suggested by @tapiarafael worked for me too. Thank you! |
Good day, |
I solved this using the new endpoint Check this documentation, there are more info about this new endpoint |
You're getting a status code of 403, meaning you're forbidden to access the
data you want to. Errors like this will occur in this scenario when you're
not accurately providing your client id and client secret. Maybe there's a
typographical error? Or maybe you're not importing it properly from your
environmental variables file (.env)? Check that
…On Tue, 19 Sep 2023, 15:53 Hemant Maurya, ***@***.***> wrote:
For me on me or userinfo both i am getting same response *Not enough
permissions to access: GET /me* and *Not enough permissions to access:
GET /userinfo*
[image: Screenshot from 2023-09-18 21-52-03]
<https://user-images.githubusercontent.com/68320014/268999265-e89117d7-413d-4843-a959-28882f9daf7e.png>
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARHMW3JPTTLNZELMUPSJ3QDX3GWWDANCNFSM4GPXKGFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@AMUZY In these route |
The link you're to check is the authorization link that the browser
navigates to as soon as you click Sign In button. embedded in the link
should be something like "clientId=[your client id string value]" and
"clientsecret=[your client secret value]". Along with other parameters like
scope e.t.c. So check this link if you get your correct client id value and
and secret embedded in it
…On Tue, 19 Sep 2023, 17:54 Hemant Maurya, ***@***.***> wrote:
@AMUZY <https://github.com/AMUZY> In these route
https://www.linkedin.com/oauth/v2/authorization and
https://www.linkedin.com/oauth/v2/accessToken are just working fine and I
am getting responses from there where it needs client id and client secret
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARHMW3N2M2TOHDRYIO6GD5DX3HE4DANCNFSM4GPXKGFQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you very much @tapiarafael for your help. The below code was what I added to the linkedin_oauth2 section of the SOCIALACCOUNT_PROVIDERS inside the settings.py file of my project. I don't know if you can help to check if I am not missing something or probably the documentation isn't for python (django). |
In the Authorization link when i sign in from there it redirect to another url from there i recieve |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Oh oh. Are you using Nextjs? Sent from Mail for Windows From: Hemant MauryaSent: Wednesday, September 20, 2023 12:52 PMTo: decioferreira/omniauth-linkedin-oauth2Cc: Amu Christian Nnamdi; MentionSubject: Re: [decioferreira/omniauth-linkedin-oauth2] Unauthorised scope r_liteprofile with linkedin oauth2 (#45) The link you're to check is the authorization link that the browser navigates to as soon as you click Sign In button. embedded in the link should be something like "clientId=[your client id string value]" and "clientsecret=[your client secret value]". Along with other parameters like scope e.t.c. So check this link if you get your correct client id value and and secret embedded in it…On Tue, 19 Sep 2023, 17:54 Hemant Maurya, @.> wrote: @AMUZY https://github.com/AMUZY In these route https://www.linkedin.com/oauth/v2/authorization and https://www.linkedin.com/oauth/v2/accessToken are just working fine and I am getting responses from there where it needs client id and client secret — Reply to this email directly, view it on GitHub <#45 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARHMW3N2M2TOHDRYIO6GD5DX3HE4DANCNFSM4GPXKGFQ . You are receiving this because you were mentioned.Message ID: @.>In the Authorization link when i sign in from there it redirect to another url from there i recieve code from linkedin and state which i am providing during the authorization url call, embeded in the callback urlI am not recieving client_id or client_secret in the embeded on it—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Oh oh. Are you using Nextjs? Sent from Mail for Windows From: Hemant MauryaSent: Wednesday, September 20, 2023 12:52 PMTo: decioferreira/omniauth-linkedin-oauth2Cc: Amu Christian Nnamdi; MentionSubject: Re: [decioferreira/omniauth-linkedin-oauth2] Unauthorised scope r_liteprofile with linkedin oauth2 (#45) The link you're to check is the authorization link that the browser navigates to as soon as you click Sign In button. embedded in the link should be something like "clientId=[your client id string value]" and "clientsecret=[your client secret value]". Along with other parameters like scope e.t.c. So check this link if you get your correct client id value and and secret embedded in it…On Tue, 19 Sep 2023, 17:54 Hemant Maurya, @.> wrote: @AMUZY https://github.com/AMUZY In these route https://www.linkedin.com/oauth/v2/authorization and https://www.linkedin.com/oauth/v2/accessToken are just working fine and I am getting responses from there where it needs client id and client secret — Reply to this email directly, view it on GitHub <#45 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARHMW3N2M2TOHDRYIO6GD5DX3HE4DANCNFSM4GPXKGFQ . You are receiving this because you were mentioned.Message ID: @.>In the Authorization link when i sign in from there it redirect to another url from there i recieve code from linkedin and state which i am providing during the authorization url call, embeded in the callback urlI am not recieving client_id or client_secret in the embeded on it—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***> No I am using Postman |
The issue with 'SCOPE': ['profile'] is that it doesn't return user's profile information like education, job etc. Does anyone know how we can retrieve such information? |
I am getting
unauthorized_scope_error | Scope "r_liteprofile" is not authorized for your application
very sporadically with linkedin oauth-2. This is very weird as there's nor_liteprofile
in the linkedin developer's console. It only hasbasicprofile
,r_emailaddress
,rw_company_admin
andw_share
. Is this a pre-known issue ? Not getting any footprint online.Linkedin is pushing the control to
https://www.linkedin.com/oauth/v2/authorization?client_id=817pm189a9zxnp&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Flinkedin%2Fcallback&response_type=code&scope=r_basicprofile&state=cea1676704da0832326304c1da6ee80eabc79463da80ac1d
which hasr_liteprofile
while on linkedin console I'm clearly only requestingr_basicprofile
.The text was updated successfully, but these errors were encountered: