-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: added migration section about JWT able to identify subjects usi…
…ng another field than the user ID (#1066)
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]" | ||
} | ||
``` | ||
::: |