Skip to content

Comments

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

Merged
daffl merged 1 commit intodovefrom
dynamic-oauth-redirect-2430
Oct 13, 2021
Merged

feat(authentication-oauth): Allow dynamic oAuth redirect#2469
daffl merged 1 commit intodovefrom
dynamic-oauth-redirect-2430

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