Flagsmith / Flagsmith/flagsmith

Undocumented parameter required for GitHub Oauth

Open
#6,948 1 comment 0 reactions 0 assignees View on GitHub
docs
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

### How are you running Flagsmith

- [ ] Self Hosted with Docker
- [x] Self Hosted with Kubernetes
- [ ] SaaS at flagsmith.com
- [ ] Some other way (add details in description below)

### Describe the bug

I don't know if this was documented in the past (I couldn't find an issue for it), but...

When setting up GitHub Oauth on the OSS/community edition the oauth_github flag actually needs a full JSON value with scopes, Oauth client ID, and redirect URI.

```
{"url":"https://github.com/login/oauth/authorize?client_id=&redirect_uri=https:///oauth/github&scope=user:email"}
```

Also, `&scope=user:email` is required in the URL, or lookup fails with TypeError in the backend.

The actual docs on these pages make no mention of it:

* https://docs.flagsmith.com/administration-and-security/access-control/oauth
* https://docs.flagsmith.com/deployment-self-hosting/core-configuration/running-flagsmith-on-flagsmith

Took a looot of reverse engineering to figure this out.

Can you please update documentation with a note to the URL/scope/redirect URI parameters inside the `oauth_github` flag in Flagsmith-On-Flagsmith project?

Or, alternatively, fix frontend code so this can be extracted from existing environment variables and auto-generated by Flagsmith.

### Steps To Reproduce

I'm running Flagsmith in Kubernetes via Helm chart with separate frontend and backend deployments, but I would expect this issue to persist independent of deployment method (except maybe docker-compose if default values are hardcoded for local dev)

To reproduce, simply set up GitHub Oauth as documented.

### Expected behavior

I would expect GitHub oauth to work as decsribed in the docs.

### Screenshots

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.