mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-21 16:41:56 +00:00
fix: preserve operator scopes for shared auth connections
When connecting via shared gateway token (no device identity),
the operator scopes were being cleared, causing API operations
to fail with 'missing scope' errors.
This fix preserves scopes when sharedAuthOk is true, allowing
headless/API operator clients to retain their requested scopes.
Fixes #27494
(cherry picked from commit c71c8948bd)
This commit is contained in:
committed by
Peter Steinberger
parent
0ab5f4c43b
commit
9c142993b8
@@ -486,7 +486,7 @@ export function attachGatewayWsMessageHandler(params: {
|
||||
close(1008, truncateCloseReason(authMessage));
|
||||
};
|
||||
const clearUnboundScopes = () => {
|
||||
if (scopes.length > 0 && !controlUiAuthPolicy.allowBypass) {
|
||||
if (scopes.length > 0 && !controlUiAuthPolicy.allowBypass && !sharedAuthOk) {
|
||||
scopes = [];
|
||||
connectParams.scopes = scopes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user