ac4af582301a4e8a29245dbba767eba31334ddf9
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cc09c5bd97 |
stepfun: a Step Plan sign-in is the provider's own, not its site's: two accounts on one site show their own windows (#2384)
stepfun-auth.json kept one platform session per site ("ai", "com"), so
every StepFun provider on a site shared it: bringing a sign-in to one
signed in all of them, two accounts showed the same windows, and signing
one out signed out all (fangzhengjin, #2384). Sessions are now kept by
provider id; the site, which platform is asked, is still the provider's
(StepFunSite). StepFunSignedIn, SaveStepFunSession, SaveStepFunPaste,
SignOutStepFun, stepfunNow and stepfunAsk take the id, and
stepPlanQuotas gives one card per signed-in provider, not one per site.
Nobody signs in again for the upgrade: a file still keyed by site is
given, on read, to the StepFun providers on that site (stepfunBySite) and
written back through the temp-and-rename write. One provider: it's
theirs. Several: each gets it, so nobody loses their windows, and the
user brings the other account's sign-in to the ones that are someone
else's. Those copies are one sign-in, so stepfunNow renews every entry
holding the same refresh token together; renewed apart, the platform
could end the token the first renewal replaced and sign the others out.
With no StepFun provider on the site yet (or providers.json unreadable)
the old entry waits as it is. A file that doesn't parse, or that holds an
entry of another shape, is read as no session and nothing but a new
sign-in writes over it, after lastgood.KeepUnparsed has kept it aside.
Every other place keyed by the provider follows: Delete drops its
session (a provider added later under the same id doesn't inherit it),
Rename moves it, and the GUI posts /api/stepfun/{id}/session and
/api/stepfun/{id}/signout, 404 for an id that isn't a StepFun
provider's (a site's name among them). Backup and sync never carried
stepfun-auth.json, so nothing changes there.
Built on fangzhengjin's stepfun-per-provider branch (996cf969e), which
rekeyed the session by id. Not taken from it: it made every existing user
sign in again, left Delete and Rename on the old keys (a renamed provider
lost its sign-in, a removed one's was inherited by a new provider of the
same id), let signout take any id, and its two-provider test checked
only the stored Account, never each provider's windows.
Run at this head (on origin/main
|