fix(auth): address Claude review on OAuth persist serialization
Serialize persist() in OAuthStorageBase so overlapping remote POSTs cannot reorder and clobber state. Regenerate launcher package-lock.json to drop stale zustand entries. Let parseOAuthPersistBlob accept parsed objects from res.json() without a redundant JSON round-trip.
This commit is contained in:
parent
3c65bdb4c6
commit
af174666d6
2 changed files with 31 additions and 993 deletions
988
clients/launcher/package-lock.json
generated
988
clients/launcher/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -21,6 +21,16 @@ describe("parseOAuthPersistBlob", () => {
|
|||
expect(parseOAuthPersistBlob(JSON.stringify(snapshot))).toEqual(snapshot);
|
||||
});
|
||||
|
||||
it("accepts an already-parsed object without re-serializing", () => {
|
||||
const snapshot = {
|
||||
servers: {
|
||||
"http://example.com": { codeVerifier: "v1" },
|
||||
},
|
||||
idpSessions: {},
|
||||
};
|
||||
expect(parseOAuthPersistBlob(snapshot)).toEqual(snapshot);
|
||||
});
|
||||
|
||||
it("promotes legacy persist envelope state to the top level", () => {
|
||||
const legacy = {
|
||||
state: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue