dropsh 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,6 +52,11 @@ export interface AdapterRuntime {
|
|
|
52
52
|
now(): number;
|
|
53
53
|
/** Persist a refreshed session back to the active session slot. */
|
|
54
54
|
save(session: AuthSession): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Re-read the persisted session slot. Other processes sharing the slot may have
|
|
57
|
+
* renewed (and rotated the refresh token) since this adapter was created.
|
|
58
|
+
*/
|
|
59
|
+
load?(): Promise<AuthSession | undefined>;
|
|
55
60
|
}
|
|
56
61
|
export interface AuthProvider {
|
|
57
62
|
readonly id: string;
|
package/dist/src/index.js
CHANGED
|
@@ -68,6 +68,7 @@ export async function resolveAuth(deps) {
|
|
|
68
68
|
http: deps.http,
|
|
69
69
|
now: deps.now,
|
|
70
70
|
save: (session) => writeProfile(deps.baseUrl, name, provider.id, session, deps.stateDir),
|
|
71
|
+
load: async () => (await readProfiles(deps.baseUrl, deps.stateDir))?.profiles[name]?.session,
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
// No stored session for the chosen profile: a login-less provider carries its
|