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 additional query parameters causing issues #2398

Merged
merged 3 commits into from Jun 23, 2021
Merged

Conversation

mrfrase3
Copy link
Contributor

Summary

the expressOauth code allows passing through more parameters than redirect, which all get lumped into an object called query, this then gets put into the params object on the other end of the oauth flow for convenience.

e.g. https://mybackend.com/oauth/google?redirect=/checkout&cartId=1234
results in the following in params being available { redirect: '/checkout', query: { cartId: 1234 } }

The issue is that these params are passed directly into the patch/get/create service method calls in the strategy, so then the query is used to filter the patch request and an error is returned where the id is not found.

Omitting the query from the params fixes this issue.

@daffl
Copy link
Member

daffl commented Jun 23, 2021

That makes sense, I believe the import should be import { createDebug, _ } from '@feathersjs/commons'; and then _.omit though.

@daffl daffl merged commit 04c7c83 into feathersjs:dove Jun 23, 2021
@daffl
Copy link
Member

daffl commented Jun 23, 2021

K, got it fixed, published in v5.0.0-pre.5

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