@merkaly/nuxt 0.12.0 → 0.12.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/README.md CHANGED
@@ -37,7 +37,7 @@ On boot the module restores an existing session (user and token) and then runs t
37
37
 
38
38
  ### Session lifetime
39
39
 
40
- The SPA keeps the session with **refresh tokens**: the client uses `useRefreshTokens` with `localStorage` cache and logs in with `audience` and `scope: openid profile email offline_access`. Before each API call the module asks Auth0 for the current access token, which is cached and renewed with the refresh token once it expires (2 hours for `https://api.merkaly.io`). When the refresh token is gone or expired, protected surfaces (`requiresAuth: true`) go back to login instead of calling the API without a token. Account linking (`linkWithConnection(connection)`) uses a separate Auth0 client, the account linking client (named `account.merkaly.io` in Auth0, no app behind it), with an in-memory cache, created only on the first call (no extra `checkSession` on page load). It opens a login popup for that connection and sends the popup's raw ID token to `POST /identities` as `{ idToken }`; the api verifies the token (signature, issuer, audience = the account linking client, expiry) and links the identity from its `sub` into the logged-in user. Requires an api with that contract (older clients that sent `{ provider, userId }` get `400`).
40
+ The SPA keeps the session with **refresh tokens**: the client uses `useRefreshTokens` with `localStorage` cache and logs in with `audience` and `scope: openid profile email offline_access`. Before each API call the module asks Auth0 for the current access token, which is cached and renewed with the refresh token once it expires (2 hours for `https://api.merkaly.io`). When the refresh token is gone or expired, protected surfaces (`requiresAuth: true`) go back to login instead of calling the API without a token. Account linking (`linkWithConnection(connection)`) uses a separate Auth0 client, the `auth.merkaly.io` SPA client in Auth0, with an in-memory cache, created only on the first call (no extra `checkSession` on page load). It opens a login popup for that connection and sends the popup's raw ID token to `POST /identities` as `{ idToken }`; the api verifies the token (signature, issuer, audience = the account linking client, expiry) and links the identity from its `sub` into the logged-in user. Requires an api with that contract (older clients that sent `{ provider, userId }` get `400`).
41
41
 
42
42
  The Auth0 side (tenant, API, app settings, refresh token rotation and lifetimes, organizations, and the checklist for a new app) is documented in the auth.merkaly.io repo: [`docs/tenant-setup.md`](https://github.com/merkaly-io/auth.merkaly.io/blob/master/docs/tenant-setup.md).
43
43
 
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.14.0"
6
6
  },
7
- "version": "0.12.0",
7
+ "version": "0.12.1",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -193,14 +193,12 @@ function getRowAttrs(item, idx) {
193
193
  <BTh v-if="hasDetailsSlot" class="w-25px" style="padding: unset !important;" />
194
194
 
195
195
  <BTh v-if="!props.hideSelect" class="w-40px px-0">
196
- <div class="form-check form-check-sm form-check-custom cell-checkbox">
197
- <input
198
- :disabled="$datagrid.loading"
199
- class="form-check-input"
200
- type="checkbox"
201
- v-bind="selectionState.checkboxAllAttrs"
202
- @input="toggleCheckAll()">
203
- </div>
196
+ <BFormCheckbox
197
+ :disabled="$datagrid.loading"
198
+ :indeterminate="selectionState.checkboxAllAttrs.indeterminate"
199
+ :model-value="selectionState.allChecked"
200
+ class="form-check-sm form-check-custom cell-checkbox"
201
+ @update:model-value="toggleCheckAll()" />
204
202
  </BTh>
205
203
 
206
204
  <template v-for="[key, column] in visibleColumns" :key="key">
@@ -238,9 +236,10 @@ function getRowAttrs(item, idx) {
238
236
  </BTd>
239
237
 
240
238
  <BTd v-if="!props.hideSelect" class="w-40px px-0">
241
- <div class="form-check form-check-sm form-check-custom cell-checkbox">
242
- <input v-model="item._checked" :disabled="$datagrid.loading" class="form-check-input" type="checkbox">
243
- </div>
239
+ <BFormCheckbox
240
+ v-model="item._checked"
241
+ :disabled="$datagrid.loading"
242
+ class="form-check-sm form-check-custom cell-checkbox" />
244
243
  </BTd>
245
244
 
246
245
  <template v-for="[key, column] in visibleColumns" :key="key">
@@ -282,9 +281,9 @@ function getRowAttrs(item, idx) {
282
281
  <template v-if="!props.hidePagination">
283
282
  <BRow align-h="between" align-v="center" class="w-100">
284
283
  <BCol cols="auto">
285
- <select v-model="$datagrid.limit" class="form-select form-select-sm form-select-solid" disabled>
284
+ <BFormSelect v-model="$datagrid.limit" class="form-select-solid" disabled size="sm">
286
285
  <BFormSelectOption :value="10">10</BFormSelectOption>
287
- </select>
286
+ </BFormSelect>
288
287
  </BCol>
289
288
 
290
289
  <BCol v-show="!$datagrid.loading" cols="auto">
@@ -77,8 +77,8 @@ export default defineNuxtPlugin(async ({ callHook, hook }) => {
77
77
  redirect_uri: URL.canParse($config.merkaly.auth0.callbackUrl) ? $config.merkaly.auth0.callbackUrl : location.origin.concat($config.merkaly.auth0.callbackUrl)
78
78
  },
79
79
  cacheLocation: "memory",
80
- clientId: "AwD3uBHhLhFBbJhwSWXYFh9cZYidNc6L",
81
- // account.merkaly.io, the api checks this audience
80
+ clientId: "15yd1Ag668M0mQVbmjA60NaCD53UDIRQ",
81
+ // auth.merkaly.io SPA, the api checks this audience
82
82
  domain: $config.merkaly.auth0.domain
83
83
  });
84
84
  auth0.linkWithConnection = async (connection) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/nuxt",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/merkaly-io/nuxt.git"