@oxyhq/core 9.2.0 → 9.2.1
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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/boot/sessionColdBoot.js +13 -0
- package/dist/cjs/index.js +6 -4
- package/dist/cjs/mixins/OxyServices.accounts.js +3 -0
- package/dist/cjs/session/accountDialogController.js +1 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/boot/sessionColdBoot.js +13 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/mixins/OxyServices.accounts.js +1 -0
- package/dist/esm/session/accountDialogController.js +1 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/mixins/OxyServices.accounts.d.ts +8 -0
- package/dist/types/mixins/OxyServices.auth.d.ts +1 -0
- package/dist/types/models/interfaces.d.ts +3 -1
- package/dist/types/models/session.d.ts +6 -0
- package/package.json +1 -1
- package/src/boot/__tests__/sessionColdBoot.test.ts +20 -0
- package/src/boot/sessionColdBoot.ts +13 -0
- package/src/index.ts +3 -0
- package/src/mixins/OxyServices.accounts.ts +9 -0
- package/src/mixins/OxyServices.auth.ts +2 -0
- package/src/models/interfaces.ts +3 -1
- package/src/models/session.ts +6 -0
- package/src/session/__tests__/accountDialogController.test.ts +8 -1
- package/src/session/accountDialogController.ts +9 -1
|
@@ -106,6 +106,19 @@ export async function runSessionColdBoot(opts) {
|
|
|
106
106
|
if (!session?.accessToken) {
|
|
107
107
|
return { kind: 'skip' };
|
|
108
108
|
}
|
|
109
|
+
// `verifyChallenge` mints a rotating deviceSecret; persist it so the next
|
|
110
|
+
// boot can use the faster device-secret-mint lane (sockets + tab-focus
|
|
111
|
+
// re-mint depend on the credential being in the store).
|
|
112
|
+
if (session.deviceId && session.deviceSecret) {
|
|
113
|
+
await store.save({
|
|
114
|
+
sessionId: session.sessionId,
|
|
115
|
+
userId: session.user.id,
|
|
116
|
+
deviceId: session.deviceId,
|
|
117
|
+
deviceSecret: session.deviceSecret,
|
|
118
|
+
accessToken: session.accessToken,
|
|
119
|
+
expiresAt: session.expiresAt,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
109
122
|
return {
|
|
110
123
|
kind: 'session',
|
|
111
124
|
session: {
|
package/dist/esm/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export { OxyAppDataIdentifierError } from './mixins/OxyServices.appData.js';
|
|
|
34
34
|
export { getNormalizedUserId, normalizeUserIdentity, normalizeUserIdentityOrNull, } from './utils/userIdentity.js';
|
|
35
35
|
export { getCanonicalUserHandle, getNormalizedUserHandle, } from './utils/userHandle.js';
|
|
36
36
|
export { normalizeProfileLinks } from './utils/profileLinks.js';
|
|
37
|
+
export { ORGANIZATION_CATEGORIES } from './mixins/OxyServices.accounts.js';
|
|
37
38
|
// ---------------------------------------------------------------------------
|
|
38
39
|
// Self-sovereign identity (DID, signed records, auth-method ↔ VM mapping,
|
|
39
40
|
// verified domains). Wire shapes (DidDocument, SignedRecordEnvelope,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { normalizeUserIdentity } from '../utils/userIdentity.js';
|
|
2
2
|
import { CACHE_TIMES } from './mixinHelpers.js';
|
|
3
|
+
export { ORGANIZATION_CATEGORIES } from '@oxyhq/contracts';
|
|
3
4
|
export function OxyServicesAccountsMixin(Base) {
|
|
4
5
|
return class extends Base {
|
|
5
6
|
constructor(...args) {
|
|
@@ -523,6 +523,7 @@ export class AccountDialogController {
|
|
|
523
523
|
expiresAt: claimed.expiresAt ?? '',
|
|
524
524
|
user: minimalUser,
|
|
525
525
|
accessToken: claimed.accessToken,
|
|
526
|
+
...(claimed.deviceSecret ? { deviceSecret: claimed.deviceSecret } : {}),
|
|
526
527
|
}, minimalUser);
|
|
527
528
|
}
|
|
528
529
|
catch (error) {
|