@absolutejs/auth 0.65.5 → 0.65.6

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/index.js CHANGED
@@ -31572,7 +31572,7 @@ var createNeonLinkedProviderGrantStore = (db) => ({
31572
31572
  owner_ref: grant.ownerRef,
31573
31573
  provider_family: grant.providerFamily,
31574
31574
  provider_subject: grant.providerSubject,
31575
- refresh_token_ciphertext: grant.refreshTokenCiphertext ?? null,
31575
+ refresh_token_ciphertext: sql`coalesce(excluded.refresh_token_ciphertext, ${linkedProviderGrantsTable.refresh_token_ciphertext})`,
31576
31576
  status: grant.status,
31577
31577
  token_type: grant.tokenType ?? null,
31578
31578
  updated_at: new Date(grant.updatedAt)
@@ -31631,7 +31631,11 @@ var createInMemoryLinkedProviderStores = (input = {}) => {
31631
31631
  [...bindings.entries()].filter(([, binding]) => binding.grantId === id).forEach(([bindingId2]) => bindings.delete(bindingId2));
31632
31632
  },
31633
31633
  saveGrant: async (grant) => {
31634
- grants.set(grant.id, cloneGrant(grant));
31634
+ const existing = grants.get(grant.id);
31635
+ grants.set(grant.id, cloneGrant({
31636
+ ...grant,
31637
+ refreshTokenCiphertext: grant.refreshTokenCiphertext ?? existing?.refreshTokenCiphertext
31638
+ }));
31635
31639
  }
31636
31640
  };
31637
31641
  const bindingStore = {
@@ -38236,5 +38240,5 @@ export {
38236
38240
  AGENT_CLAIM_GRANT_TYPE
38237
38241
  };
38238
38242
 
38239
- //# debugId=BB9E2E153512DF2164756E2164756E21
38243
+ //# debugId=9CCB3DA09AA91A9764756E2164756E21
38240
38244
  //# sourceMappingURL=index.js.map