Skip to content
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

Fix LinkedIn OAuth Scope and Profile Collection in GoTrue Library #1232

Closed

Conversation

tobias-istvan
Copy link

What kind of change does this PR introduce?

This PR introduces a bug fix to address issues related to LinkedIn OAuth within the GoTrue library.

What is the current behavior?

LinkedIn applications created after 1st of August experience difficulties while attempting to log in with GoTrue due to incorrect scope requests.

Relevant issue: Link to relevant issue

What is the new behavior?

This PR aims to rectify the issue by making necessary adjustments to the OAuth scopes. Specifically, the scopes openid, email, and profile will be utilized. Additionally, the method of collecting profile information is updated, employing the /v2/userinfo API endpoint.

Visual changes: No visual changes.

Additional context

While I may not be a Go developer or intimately familiar with the library, I have conducted local testing within a Docker environment. By utilizing the GoTrue.js library, I was able to successfully log in and retrieve the access token through the callback URL. However, I have not progressed to subsequent testing stages due to a lack of understanding about the next steps required.

@tobias-istvan tobias-istvan requested a review from a team as a code owner August 23, 2023 22:47
Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

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

i don't think we can change the existing linkedin oauth implementation because this will break existing linkedin oauth apps that used to work with the previous scopes

this API change only affects new linkedin oauth apps, if it needs to be supported, it should be created as a separated provider

internal/api/provider/linkedin.go Outdated Show resolved Hide resolved
@josmo
Copy link
Contributor

josmo commented Sep 15, 2023

@tobias-istvan I hope you don't mind but I opened #1248 to create a new provider based on you're updates and keep the existing one intact

@kangmingtay does that seem like what you had in mind? any feedback on it?

kangmingtay added a commit that referenced this pull request Sep 25, 2023
… applications (#1248)

## What kind of change does this PR introduce?

This PR introduces a new linkedin provider to address issues related to
the current LinkedIn provider no longer being available for new
applications.

## What is the current behavior?

LinkedIn applications created after 1st of August experience
difficulties while attempting to log in with GoTrue due to incorrect
scope requests.

Relevant issue:
#1216 (comment)
Relevant initial fix however would lead to breaking existing apps -
#1232

## What is the new behavior?

This PR aims to rectify the issue by adding a new provider with the
updated OAuth scopes. Specifically, the scopes openid, email, and
profile will be utilized. Additionally, the method of collecting profile
information is updated, employing the /v2/userinfo API endpoint.

Visual changes: No visual changes.

## Additional context

I've taken the initial updates from PR
#1232 into the new providers
while also adding the relevant settings and provider implementations. I
don't know much in terms of this library so would love to get additional
feedback.

I validated that the -
http://localhost:9999/authorize?provider=linkedin-oidc workflow worked
locally and had the relevant information in the Claim

---------

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
@kangmingtay
Copy link
Member

Hey @tobias-istvan, thanks for spending the time and effort to contribute to this project! We've since merged the PR opened by @josmo #1248 since it preserves backward compatibility for existing linkedin oauth apps and will be closing this PR.

@kangmingtay kangmingtay closed this Oct 3, 2023
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
… applications (supabase#1248)

## What kind of change does this PR introduce?

This PR introduces a new linkedin provider to address issues related to
the current LinkedIn provider no longer being available for new
applications.

## What is the current behavior?

LinkedIn applications created after 1st of August experience
difficulties while attempting to log in with GoTrue due to incorrect
scope requests.

Relevant issue:
supabase#1216 (comment)
Relevant initial fix however would lead to breaking existing apps -
supabase#1232

## What is the new behavior?

This PR aims to rectify the issue by adding a new provider with the
updated OAuth scopes. Specifically, the scopes openid, email, and
profile will be utilized. Additionally, the method of collecting profile
information is updated, employing the /v2/userinfo API endpoint.

Visual changes: No visual changes.

## Additional context

I've taken the initial updates from PR
supabase#1232 into the new providers
while also adding the relevant settings and provider implementations. I
don't know much in terms of this library so would love to get additional
feedback.

I validated that the -
http://localhost:9999/authorize?provider=linkedin-oidc workflow worked
locally and had the relevant information in the Claim

---------

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
… applications (supabase#1248)

## What kind of change does this PR introduce?

This PR introduces a new linkedin provider to address issues related to
the current LinkedIn provider no longer being available for new
applications.

## What is the current behavior?

LinkedIn applications created after 1st of August experience
difficulties while attempting to log in with GoTrue due to incorrect
scope requests.

Relevant issue:
supabase#1216 (comment)
Relevant initial fix however would lead to breaking existing apps -
supabase#1232

## What is the new behavior?

This PR aims to rectify the issue by adding a new provider with the
updated OAuth scopes. Specifically, the scopes openid, email, and
profile will be utilized. Additionally, the method of collecting profile
information is updated, employing the /v2/userinfo API endpoint.

Visual changes: No visual changes.

## Additional context

I've taken the initial updates from PR
supabase#1232 into the new providers
while also adding the relevant settings and provider implementations. I
don't know much in terms of this library so would love to get additional
feedback.

I validated that the -
http://localhost:9999/authorize?provider=linkedin-oidc workflow worked
locally and had the relevant information in the Claim

---------

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
… applications (supabase#1248)

## What kind of change does this PR introduce?

This PR introduces a new linkedin provider to address issues related to
the current LinkedIn provider no longer being available for new
applications.

## What is the current behavior?

LinkedIn applications created after 1st of August experience
difficulties while attempting to log in with GoTrue due to incorrect
scope requests.

Relevant issue:
supabase#1216 (comment)
Relevant initial fix however would lead to breaking existing apps -
supabase#1232

## What is the new behavior?

This PR aims to rectify the issue by adding a new provider with the
updated OAuth scopes. Specifically, the scopes openid, email, and
profile will be utilized. Additionally, the method of collecting profile
information is updated, employing the /v2/userinfo API endpoint.

Visual changes: No visual changes.

## Additional context

I've taken the initial updates from PR
supabase#1232 into the new providers
while also adding the relevant settings and provider implementations. I
don't know much in terms of this library so would love to get additional
feedback.

I validated that the -
http://localhost:9999/authorize?provider=linkedin-oidc workflow worked
locally and had the relevant information in the Claim

---------

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants