mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 02:31:24 +00:00
auth: persist explicit profile upserts directly
This commit is contained in:
@@ -61,7 +61,10 @@ export function upsertAuthProfile(params: {
|
||||
: params.credential;
|
||||
const store = ensureAuthProfileStoreForLocalUpdate(params.agentDir);
|
||||
store.profiles[params.profileId] = credential;
|
||||
saveAuthProfileStore(store, params.agentDir, { syncExternalCli: false });
|
||||
saveAuthProfileStore(store, params.agentDir, {
|
||||
filterExternalAuthProfiles: false,
|
||||
syncExternalCli: false,
|
||||
});
|
||||
}
|
||||
|
||||
export async function upsertAuthProfileWithLock(params: {
|
||||
|
||||
@@ -33,6 +33,7 @@ type LoadAuthProfileStoreOptions = {
|
||||
};
|
||||
|
||||
type SaveAuthProfileStoreOptions = {
|
||||
filterExternalAuthProfiles?: boolean;
|
||||
syncExternalCli?: boolean;
|
||||
};
|
||||
|
||||
@@ -417,6 +418,9 @@ export function saveAuthProfileStore(
|
||||
if (credential.type !== "oauth") {
|
||||
return true;
|
||||
}
|
||||
if (options?.filterExternalAuthProfiles === false) {
|
||||
return true;
|
||||
}
|
||||
return shouldPersistExternalAuthProfile({
|
||||
store,
|
||||
profileId,
|
||||
|
||||
Reference in New Issue
Block a user