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

OAuth not respecting path or prefix #2116

Closed
forgot opened this issue Nov 6, 2020 · 2 comments
Closed

OAuth not respecting path or prefix #2116

forgot opened this issue Nov 6, 2020 · 2 comments

Comments

@forgot
Copy link

forgot commented Nov 6, 2020

I'm attempting to user OAuth with Feathers behind /api, but the internal routes created don't seem to respect anything added to path or prefix in the Grant configuration. Everything works in localhost, but I can't figure out how to get it to work with /api. I've been trying to debug this for the last three days and,

I've tried setting path, prefix, origin, callback, redirect_uri, in every combination that I can think of, but nothing seems to work.

Here are the relevant parts from the production.json config file.

 "oauth": {
      "redirect": "/home",
      "defaults": {
        "prefix": "/api"
      },
      "github": {
        "key": "GITHUB_KEY",
        "secret": "GITHUB_SECRET",
        "callback": "/api/oauth/github/callback",
        "redirect_uri": "/api/oauth/github/callback"
      }
}

I've also tried setting everything explicitly, but still nothing...

Calling /api/oauth/github redirects to /oauth/connect/github?, which throws a 404. If I add the /api to the beginning, I get redirected to Github for login.

I've read through the documentation for Feathers and for Grant several times, but can't come up with a solution. I've seen a few other issues here or questions on StackOverflow with similar problems, but can't find an answer. Any insights as to how I should accomplish this?

@daffl
Copy link
Member

daffl commented Nov 9, 2020

Probably the same issue as #2031

@forgot
Copy link
Author

forgot commented Nov 11, 2020

Closing to consolidate discussion in the above linked issue

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

No branches or pull requests

2 participants