Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an instance-owned OAuth authorization bridge for Web, App, and Desktop public clients.
Previously, provider OAuth codes were returned directly to a Web callback, which could not safely support native custom schemes or desktop loopback callbacks. This change keeps provider authorization codes, client secrets, and provider tokens on the user’s DEEIX server. Public clients receive only a short-lived, single-use DEEIX grant bound to the client’s PKCE verifier.
This PR:
login-options.Change type
Affected areas
Verification
pnpm checkcd backend && go test ./...cd backend && make swaggerScreenshots, API examples, or logs
Admin identity-provider configuration now shows:
Canonical provider callback:
Start an authorization:
Example response:
{ "errorMsg": "", "data": { "authorizationURL": "https://provider.example.com/oauth/authorize?...", "expiresAt": "2026-08-06T12:10:00Z" } }After the provider redirects to the DEEIX server, the server returns a short-lived grant to the client callback:
Exchange the grant:
The response uses the existing login response contract, including existing 2FA challenge behavior.
Configuration, migration, and compatibility notes
PUBLIC_API_BASE_URLmust contain the externally reachable API base URL.Production deployments must use an HTTPS
PUBLIC_API_BASE_URL.The canonical provider callback is generated as:
Reverse-proxy deployments must configure the public proxy URL, not the Go service’s internal listen address.
No database migration is required.
Short-lived transactions and grants use the configured cache backend:
Transactions expire after 10 minutes.
One-time client grants expire after 90 seconds.
Supported built-in public clients:
/auth/callback?provider=<slug>.com.deeix.chat:/oauth/callback./oauth/callback.Existing
GET /auth/providers/:slug/startandPOST /auth/providers/:slug/callbackroutes remain available.Older servers and deployments without a configured bridge continue using the legacy Web flow.
Account identity binding currently continues using the legacy Web callback.
The admin console marks the legacy callback as being deprecated.
Multi-platform clients using the bridge have not yet been formally released.
Swagger documents and generated
@deeix/api-contracttypes are included.Documentation
Updated documentation covers:
PUBLIC_API_BASE_URLbehavior across reverse-proxy, static frontend, and separated frontend/backend deployments.Security and privacy
Security properties:
/oauth/callback.Cache-Control: no-store.Checklist
.pycfiles,.envfiles, and local storage data are not committed.