@@ -118,6 +118,17 @@ shared key to a Discord client or browser. If the Bot initially supplies only
118118OAuth login fills those placeholders from the verified Discord profile without
119119replacing profile fields that the User has already customized.
120120
121+ Workspace exposes a generic OAuth-style authorization capability. A registered
122+ external client starts ` GET /api/auth/authorize ` ; the authorize endpoint reuses
123+ ` workspace_session ` , redirecting through the existing login page only when the
124+ session is absent, then returns a one-time short-lived code to the registered
125+ redirect URI. ` POST /api/auth/token ` validates the client secret, the registered
126+ redirect URI, the PKCE verifier, expiry, and one-time use before returning the
127+ Workspace identity. Registration is deployment-supplied via ` OAUTH_CLIENTS_JSON ` .
128+ Existing Workspace login, OAuth callbacks, Cookie behavior, and product APIs
129+ remain unchanged. The capability is additive and does not add a proxy or
130+ deployment component.
131+
121132The browser uses the same built-in runtime development license as Workspace
122133CLI. Both copies are rotated every 90 days and are application credentials, not
123134the repository software license. The built-in credential is for ` localhost ` ;
@@ -155,6 +166,7 @@ docker run --name univer-workspace \
155166 -e DISCORD_CLIENT_ID \
156167 -e DISCORD_CLIENT_SECRET \
157168 -e DISCORD_CALLBACK_URL=https://workspace.univer.plus/api/auth/discord/callback \
169+ -e OAUTH_CLIENTS_JSON \
158170 -e SECURE_COOKIES=true \
159171 univer-workspace
160172```
0 commit comments