getfider / fider

Open platform to collect and prioritize feedback
https://fider.io
GNU Affero General Public License v3.0
2.75k stars 620 forks source link

GitHub OAuth doesn't seem to be working #1127

Closed ybizeul closed 1 year ago

ybizeul commented 1 year ago

Fider Cloud or Self Hosted Self hosted v0.22.0

Describe the bug Google OAuth fails to authenticate

To Reproduce Steps to reproduce the behavior:

  1. Configure OAuth app in GitHub
  2. Configure environment OAUTH_GITHUB_CLIENTID and OAUTH_GITHUB_SECRET
  3. Restart container
  4. Try to log in

Expected behavior Login should work

Screenshots

app_1  | INFO [2023-04-03T05:40:44Z] [WEB] GET https://feedback.mydomain.org/oauth/github/token?code=6ccd7a2cd4532e4c1212&identifier=uwsqHYRu8ryJe4cQ6cequSSGDBI6gYCuGJoKmqtj1k9Ad8F4&redirect=%2F started
app_1  | ERROR [2023-04-03T05:40:45Z] [WEB] Error Trace:
app_1  | - app/handlers/oauth.go:91
app_1  | - oauth2: server response missing access_token
app_1  | INFO [2023-04-03T05:40:45Z] [WEB] GET https://feedback.mydomain.org/oauth/github/token?code=6ccd7a2cd4532e4c1212&identifier=uwsqHYRu8ryJe4cQ6cequSSGDBI6gYCuGJoKmqtj1k9Ad8F4&redirect=%2F finished with 500 in 280ms (next_error)

image

Additional context First time user, I might be missing something. Fider is behind a Traefik reverse proxy, I'm going to investigate on that front as well

ybizeul commented 1 year ago

Nevermind.

It started with the wrong environment variable (used a wrong copy/paste OAUTH_GOOGLE_SECRET instead of OAUTH_GITHUB_SECRET. After fixing it, I just restarted the container instead of doing a docker-compose up -d

Everything is fine now