fix: preserve primary bridge auth token
This commit is contained in:
parent
a353f6866f
commit
39bb2d459d
@ -592,10 +592,6 @@ String _extractBridgeServerUrlMetadata(Map<String, dynamic> payload) {
|
||||
}
|
||||
|
||||
String _extractBridgeAuthTokenMetadata(Map<String, dynamic> payload) {
|
||||
final reviewToken = _stringValue(payload['BRIDGE_REVIEW_AUTH_TOKEN']);
|
||||
if (reviewToken.isNotEmpty) {
|
||||
return reviewToken;
|
||||
}
|
||||
final aiWorkspaceToken = _stringValue(payload['AI_WORKSPACE_AUTH_TOKEN']);
|
||||
if (aiWorkspaceToken.isNotEmpty) {
|
||||
return aiWorkspaceToken;
|
||||
|
||||
@ -513,7 +513,7 @@ void main() {
|
||||
);
|
||||
|
||||
test(
|
||||
'syncAccountSettings prefers review bridge auth token when present',
|
||||
'syncAccountSettings does not persist review token as managed bridge token',
|
||||
() async {
|
||||
final storeRoot = await Directory.systemTemp.createTemp(
|
||||
'xworkmate-account-review-bridge-token-',
|
||||
@ -570,7 +570,7 @@ void main() {
|
||||
await store.loadAccountManagedSecret(
|
||||
target: kAccountManagedSecretTargetBridgeAuthToken,
|
||||
),
|
||||
'review-bridge-token',
|
||||
'multi-tenant-bridge-token',
|
||||
);
|
||||
expect(client.loadProfileCallCount, 1);
|
||||
expect(client.loadXWorkmateProfileSyncCallCount, 1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user