Flagsmith / Flagsmith/flagsmith

GitLab integration: OAuth for GitLab.com

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

Description

Context: https://github.com/Flagsmith/flagsmith/issues/7000

The GitLab integration (https://github.com/Flagsmith/flagsmith/issues/7159) supports token-based authentication. OAuth would add a one-click authorisation flow as an alternative for GitLab.com users.

Flagsmith can [register an OAuth application on gitlab.com](https://docs.gitlab.com/integration/gitlab/) that any user can authorise against. Scope: `api`.

### Scope

- Register a Flagsmith OAuth application on gitlab.com.
- Implement OAuth signature + callback endpoints. Store and refresh tokens.
- Access tokens [expire in 2 hours](https://docs.gitlab.com/integration/oauth_provider/). Refresh token lifetime is [undocumented](https://forum.gitlab.com/t/do-refresh-tokens-issued-by-gitlab-expire-and-when/83831) — handle refresh failure gracefully and allow re-authorisation without losing existing configuration.

### Acceptance criteria

- [ ] GitLab.com users can authorise Flagsmith with one click as an alternative to pasting a token
- [ ] OAuth tokens are stored and refreshed transparently
- [ ] Failed refresh allows re-authorisation without losing linked issues/MRs
- [ ] Emit structlog events for product telemetry (https://github.com/Flagsmith/flagsmith/issues/7012)

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.