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

feat(authentication-oauth): Allow dynamic oAuth redirect #2469

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

daffl
Copy link
Member

@daffl daffl commented Oct 13, 2021

This pull request allows dynamic oAuth redirects by adding an origins option to the oAuth configuration. This can be added instead of the redirect option to include a list of URLs that are allowed to make oAuth requests. It will use the Referer HTTP header from the original request to redirect back to. For example a configuration like

{
  "authentication": {
    "oauth": {
      "origins": [
        "https://feathersjs.com",
        "https://feathers.cloud"
      ]
    }
  }
}

Would allow and redirect any request made from those domains.

@daffl daffl merged commit b7143d4 into dove Oct 13, 2021
@daffl daffl deleted the dynamic-oauth-redirect-2430 branch October 13, 2021 03:49
@emmanuelgeoffray
Copy link

Hi @daffl
Thank you for this nice feature.
I think this new origins option should be omitted when authentification-oauth is parsing each strategy.
https://github.com/feathersjs/feathers/blob/dove/packages/authentication-oauth/src/index.ts#L51

@daffl
Copy link
Member Author

daffl commented Apr 13, 2022

@emmanuelgeoffray Can you open a new issue with a more detailed description?

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.

Allow multiple oAuth redirect domains OAuth2 dynamic redirect doesn't work
2 participants