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

Login session tenant is incorrectly checked in /oauth/callback #256

Closed
frankie567 opened this issue Aug 18, 2023 Discussed in #254 · 2 comments
Closed

Login session tenant is incorrectly checked in /oauth/callback #256

frankie567 opened this issue Aug 18, 2023 Discussed in #254 · 2 comments
Labels
bug Something isn't working

Comments

@frankie567
Copy link
Member

Discussed in https://github.com/orgs/fief-dev/discussions/254

Originally posted by tito August 18, 2023
Hi,

I have a self-hosted version of Fief (0.26.0), with the default Fief workspace and multiple Tenant.
I configured Github OAuth as described, and activated for a specific tenant.

From my Next JS app, i see the following process:

  1. https://myapp.com/login (provided by fief-js) -> returns HTTP 307
  2. https://fief.myapp.com/mytenant/authorize?response_type=code&... -> returns HTTP 302
  3. https://fief.myapp.com/mytenant/login -> returns HTTP 200
  4. I click on the github button
  5. https://fief.myapp.com/oauth/authorize?tenant=xxxxxxx&provider=xxxxxxx -> returns HTTP 302
  6. https://github.com/login/oauth/authorize?response_type=code&client_id=xxxx&redirect_uri=https%3A%2F%2Ffief.myapp.com%2Foauth%2Fcallback&state=xxxx&scope=offline_access+openid+user+user%3Aemail -> returns HTTP 302
  7. https://fief.myapp.com/oauth/callback?code=xxxx&state=xxxx -> returns HTTP 400

With the error "Invalid login session"

What did i do wrong ?

@frankie567 frankie567 added the bug Something isn't working label Aug 18, 2023
@frankie567
Copy link
Member Author

@all-contributors add @tito for bug

@allcontributors
Copy link
Contributor

@frankie567

I've put up a pull request to add @tito! 🎉

frankie567 added a commit that referenced this issue Aug 20, 2023
Bug fixes
---------

* Fix #256: bug preventing OAuth login to work on sub-tenants. Thanks @tito 🎉

Improvements
------------

* Implement backend logic to delete workspaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant