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 ?
Discussed in https://github.com/orgs/fief-dev/discussions/254