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(authentication-oauth): Update OAuth redirect to handle user requested redirect paths #3186

Merged
merged 2 commits into from
May 5, 2023

Conversation

engineertdog
Copy link
Contributor

This PR fixes an issue with the redirect functionality for authentication-oauth. If a user had set origins in their configuration, and attempted to redirect to a different page on the client side by using a link in the format of oauth/<name>/?redirect=my/path?, the redirect would only send them to the path of the origin myorigin/#access_token.

The problem was the variable the separator variable used to determine how to build the resulting URL. An addition test was added to verify the issue. With the change, if the user has an origin of http://localhost:8080 and a frontend application that uses OAuth with oauth/<name>/?redirect=my/path, they will be redirected properly to http://localhost:8080/my/path?access_token.

@daffl daffl changed the title Update OAuth redirect to handle user requested redirect paths fix(authentication-oauth): Update OAuth redirect to handle user requested redirect paths May 5, 2023
@daffl daffl merged commit 3742028 into feathersjs:dove May 5, 2023
2 checks passed
@daffl
Copy link
Member

daffl commented May 5, 2023

Great catch! Will go out with the next patch release.

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.

None yet

2 participants