Make SUB2API proxy defaults available across panel flows
Expose a configurable default proxy for SUB2API, resolve the proxy once, persist the proxy_id in state, and reuse it across auth URL generation, code exchange, and account creation so one OAuth flow stays on one proxy. Constraint: Upstream GitHub permission is READ, so publication must use a fork PR Rejected: Push to origin | current GitHub viewer permission does not allow upstream branch publication Rejected: Resolve proxy independently in later steps | could drift from the proxy chosen at auth URL generation Confidence: high Scope-risk: moderate Reversibility: clean Tested: npm test passed 183/183 Not-tested: Manual browser extension flow against a live SUB2API deployment
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
if (payload.sub2apiOAuthState !== undefined) updates.sub2apiOAuthState = payload.sub2apiOAuthState || null;
|
||||
if (payload.sub2apiGroupId !== undefined) updates.sub2apiGroupId = payload.sub2apiGroupId || null;
|
||||
if (payload.sub2apiDraftName !== undefined) updates.sub2apiDraftName = payload.sub2apiDraftName || null;
|
||||
if (payload.sub2apiProxyId !== undefined) updates.sub2apiProxyId = payload.sub2apiProxyId || null;
|
||||
if (Object.keys(updates).length) {
|
||||
await setState(updates);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user