Files

34 lines
1.7 KiB
Markdown

_model: devlog-entry
---
schema_version: 1
---
title: Ecosystem Integration: Gitea OAuth2 Single Sign-On and OpenGist Dossier Publishing
---
date: 2026-08-19
---
author: Labyricorn
---
summary: Connected ThinkStorm with self-hosted ecosystem services by implementing Gitea OAuth2 authentication, session cookie management, and automated dossier synchronization to OpenGist.
---
tags: authentication, gitea, sso, opengist, integrations
---
source_commit: f57d5df0880a5c9a96e6a5deb381daf458a3a11a
---
body:
# Ecosystem Integration: Gitea OAuth2 SSO & OpenGist Synchronization
To operate seamlessly within the self-hosted Labyricorn infrastructure, ThinkStorm required direct integration with authentication providers and publishing backends. This milestone unified user authentication with Gitea accounts and enabled automated snippet publishing to OpenGist.
## Key Changes
### 1. Gitea OAuth2 Single Sign-On Flow
- Configured Gitea OAuth application credentials and registered redirect callback routes at `/auth/gitea/callback`.
- Fixed authorization code exchange by enforcing `Accept: application/json` headers on token requests to Gitea.
- Implemented automated user provisioning: authenticating via Gitea retrieves profile information, associates local user records (`gitea_id`), and issues secure HTTP-only session cookies (`thinkstorm_session`).
### 2. OpenGist REST API Formatter Alignment
- Deployed OpenGist v1.15 with custom branding, SSH Git support, and Gitea OAuth links.
- Resolved REST API schema mismatches by updating the OpenGist adapter to target `POST /api/gists` using the array/map payload structures and Personal Access Token bearer authentication.
- Added direct local subnet communication to avoid external IPv6 connection latency.