Skip to content

Commit

Permalink
docs: added migration section about JWT able to identify subjects usi…
Browse files Browse the repository at this point in the history
…ng another field than the user ID (#1066)
  • Loading branch information
claustres committed Jan 29, 2025
1 parent 4d51228 commit b0504fc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/guides/migration/v2.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,25 @@ When using the composable `activity.js` from an another composable be aware that
👉 New `KRequestProgressBar` component to be used in your `App.vue` or equivalent in order to display a progress bar whenever a request to the server is processing.

👉 New `useErrors()` composable to be used in your `App.vue` or equivalent in order to display a notification whenever a request to the server raises an error.

👉 Ability for JWT to target a user using others properties then the user ID, applications should allow this in their authentication configuration.

::: details ⬇️ Example of an authentication configuration to allow JWT identifying a user by email
```js
// default.js of your application, assuming your user objects have an email properties
authentication: {
identityFields: ['email'],
...
}
```

Your JWT can now be issued [as usual](https://kalisio.github.io/skeleton/guides/development/tips.html#personal-access-token) but using a payload like this:
```json
{
"aud": "kalisio.xyz",
"iss": "kalisio",
"exp": 1552402010,
"sub": "[email protected]"
}
```
:::

0 comments on commit b0504fc

Please sign in to comment.